Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Before going any further I'd like to introduce you to a module that every professional Drupal programmer knows well, called simply Devel. This course doesn't deal with programming; that'd be an entire course in itself. But we will use one section of the Devel module that site builders like us often find helpful. It's called Devel generate. It fills your site with fake content, users, comments, and so forth. That content gives you a better idea how your site will work once people start using it. You can find it at drupal.org/project/devel.
We'll scroll down and install it in the usual way. Copy the link. Go back to my site. Click Modules and Install. Then of course, we go back and we enable that module. I am going to enable all of the development parts, Devel, Devel generate, and Devel node access. Although quite honestly we don't need Devel node access, so I'll turn that off instead, and save. Now it's a fairly simple matter to create content.
You go up to Configuration and then scroll down to Development. And here you have a lot more options, settings, content, menus, terms, and so forth. I am going to open up all of these by Command+Clicking. First, let's look at the settings. When you're developing content you really won't have to change any of these. These are as you can see all very geeky things for programmers. The one you will probably use is Generate content. I am going to create 10 nodes, and these will be both of Article and Basic page types.
I'll have them go back a week and up to three comments for each one. As you can see you can change quite a few other options, and I just say Generate. As we go through those tabs we open, you can see that there are similar options for creating menus, taxonomy terms, users, or vocabularies. The only thing I'm going to do is create three users, which we'll use later on in the course. So I'll say three users, no other changes need to be made, Generate, and we are done.
Once you've auto-generated the bits and pieces you want, you can actually turn off both Devel and Devel generate, that's because the content, users, and so on are just ordinary Drupal entities, and they don't rely on those modules. So I'll go back up into Modules, go back down and turn it off. You'll have to go through this twice because of the dependencies. There is no danger in leaving them on. I like to turn them off just so I don't have my site cluttered up with a lot of extra code. Now we can see what we created by simply going up to Content and there are our 10 nodes.
By default they are filled in with this sort of fake Latin and if there is a graphic in your content type you'll fill in this auto-generated graphic as well. In this case, it's an article which includes graphic. The same is true for People. They are just more or less random strings of letters, and there is the avatar for that person, which was more or less randomly generated. You'd be surprised how useful it is to have this so-called garbage content in your site while you're in development. I got halfway through writing this course and kept running into cases where I wished I had a user or some content to play with.
I just created them by hand as I went, but then I realized how useful it would be to have had them from the beginning. So of course I installed Devel and Devel generate and off I went. There is just one caveat: When you decide to delete all these junk users and content, be sure not to delete the real ones by accident. That's especially easy to do if you create hundreds of users or nodes. For that reason, I recommend creating only as many as you think you'll need, then adding more later as your needs change.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 100204 Viewers
56 Video lessons · 113196 Viewers
71 Video lessons · 82074 Viewers
131 Video lessons · 39381 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.