Drupal/C2/Creating-Dummy-Content/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of Script: Creating Dummy Content

Keywords: video tutorial, drupal, devel, dummy content


Visual Cue
Narration
Slide 1:

Creating Dummy Content

Welcome to the spoken tutorial on Creating Dummy Content.
Slide 2:

Learning Objectives

In this tutorial, we will learn to
  • Create dummy content using devel module.
Slide 3:

System requirement


To record this tutorial, I am using
  • Ubuntu Operating System
  • Drupal 8 and
  • Firefox web browser

You can use any web browser as per your choice.

Part 1
Time Narration
00:05 One of the things we need when we are building our Drupal site is to have a lot of content.


This will help us to understand layouts, views and designs.

00:16 But ideally, we shouldn’t use real content.


Say, we need to change a Content type, or a field.


The problem is we have to go in and edit the real content, which is a waste of time.

00:31 But this step is very important.


We need to test our content types to make sure they are working what we want.

00:39 We have only covered a few kinds of fields till now.
00:44 Here is our Cincinnati node.


Let’s say the Cincinnati group wants to charge a fee for their meetings.


And they want to put this on the site.

00:55 We can use a decimal for money, or an integer which is a whole number.
01:04 Say, you chose an integer, because they only charged 10 dollars.


But later on, they decided to charge 10.99 dollars.


Then, we are in trouble.

01:14 An integer cannot be changed into a decimal, especially after we have already added content.
01:23 And so these are the things that need to planned out beforehand.
01:30 We can test all of this by using some fake content.


These can be easily inserted, and easily deleted, when we are done with our testing.

01:41 Remember this - we don’t need hundreds of real contents but only a few fake content.
01:50 The solution to this problem is the Devel module.
02:03 Go to drupal.org/project/devel.


Till now, we haven’t actually talked about Modules or extended our Drupal website yet.


We will do that in the upcoming tutorials.

02:15 But here, we will learn to install Devel Module and use it.


This will give an idea of some of the power that Drupal Modules can give us.

02:23 Scroll down to the bottom and locate the Download section.


This screen might look very different for you.

02:34 Drupal 8 dot x version could be up in the green region.


So, make sure you click that one.

02:41 If not, then click the Development release.
02:44 Now there are two ways to do this.


We can download it, but that will give us many unnecessary files on our desktop.

02:51 Or we can right-click.


And depending on our browser, we will see either Copy Link or Copy Link Location.

03:00 Either way, click the link to the .tar file or the .zip file.


But don’t click on this dev file, because that won’t work.


These are the links to the actual files.

03:15 Once we have got that, come back to our site.


Click on Extend and then on Install new module.

03:25 Now paste the URL into the Install from a URL field.


If you have a good internet connection, you can install from the URL.


Otherwise, for your convenience, the devel package has been provided in the Code Files link on this page.


Please download it and upload it using the Choose File option here.


Lastly, click Install.

03:32 Now, click on Enable newly added modules.
03:41 Click on the word CORE to minimize it.


Then scroll down.


Under the DEVELOPMENT block, we can see Devel and Devel generate.


Ignore the others for now.

03:53 Put a checkmark in Devel and Devel generate.


Then, scroll down to the bottom and click Install.

04:05 Remember that in Drupal, we always have to make sure that we click on Save, Install, etc.
04:16 We should get a green message here – 2 modules have been enabled
04:19 Don’t worry if you see any caution message in red color, as long as it’s not a serious error.
04:27 To generate a whole bunch of content, click on Configuration.


Then on the left hand side, we will see Generate content link.


Click on that.

04:41 Now, we will be able to generate as much content as we want, to do the required testing.
04:49 We will choose Events and User Groups, because these are the 2 Content types we need to test.
04:55 Notice here, there is a Delete all content in these content types before generating new content.


This is to delete the fake content.

05:02 Let’s put a check mark there and generate 0 nodes.


This will delete all the Events and User Groups.

05:11 This will also include the ones that we created ourselves.


For example - our Cincinnati User Group would also be gone if we did this.


So, let’s uncheck that.

05:22 Let’s generate 50 nodes.
05:26 Go back a year.
05:30 We don’t have comments on our nodes.
05:33 Change the Maximum number of words in titles to 2.


If you don’t do that, this will generate a lot of long Lorem Ipsum text.

05:43 Click Generate.
05:49 Immediately, we get a success message.


To find out if it worked, click on Content.

05:57 Here’s a list of 50 new nodes - half Events and half User groups.
06:04 Click on any one and we will see that Devel has generated -
  • a lot of text in Description,
  • an Event Logo,
  • a fake Event Website,
  • a Date,
  • has chosen one of the User Groups as Sponsor
  • and has selected some of the Event Topics.
06:23 We can now do our layouts, our views and all the other things we need to do with our site.


Devel has helped us to save a lot of time by generating fake content.

06:38 This is a great feature of Drupal, provided from a Module downloaded at drupal.org.


These are called Contributed Modules. We will learn about this later.


With this we come to the end of this tutorial.

Slide 4:

Summary


Let us summarize.


In this tutorial we have learnt about

  • Creating dummy contents using devel module
Slide 5:

Acknowledgement

This video is
  • adapted from Acquia and OSTraining
  • and revised by Spoken Tutorial Project, IIT Bombay.
Slide 6:

Acknowledgement


The video at this link summarises the Spoken Tutorial project.


Pls download and watch it.

Slide 7:

Spoken Tutorial Workshops


The Spoken Tutorial Project Team conducts workshops and gives certificates.


For more details, please write to us.

Slide 8:

Acknowledgement


Spoken Tutorial Project is funded by

  • NMEICT, Ministry of Human Resource Development and
  • NVLI, Ministry of Culture

Government of India.

This is Varsha Venkatesh signing off.


Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Priyacst