Drupal For Dummies


Published on

Drupal is a CMS to build website.
For absolute beginners, the existing documentation can seem overwhelming.
This presentation demonstrates Drupal based on 3 websites.
The first website uses Drupal in a very simple, standard way. It is used to explain the concepts behind users, nodes and blocks.
The second website adds ckk & views and illustrates how to build a photo album with these modules.
The third website uses only custom content types combining different views with the pages module. It also uses 100% custom CSS, deviating from the "boxy" look of most drupal sites.

The goal of the presentation is to give an insight in how Drupal works and what it can do for you in 20 minutes.

Published in: Technology
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Drupal For Dummies

  1. Drupal for dummies<br />
  2. Level 1<br />
  3. Basic Drupal website<br />I’ll show you what these things can do:<br />Blog<br />Pages<br />Menu<br />Blocks<br />An a little trick: hide admin menu and login <br />withnode, user and taxonomy= basic Drupal lingo<br />
  4. Basic naked Drupal website<br />(warning: it’s ugly)<br />
  5. Same site, dressed up<br />(templatemonster.com: 52$)<br />
  6. Let’s look at some elements<br />(some of these have to be entered during installation. Don’t worry, we can change it later on)<br />
  7. Site logo<br />Site slogan<br />Site mission (only on 1st page)<br />Primary menu<br />
  8. This is a list oflatest blog items<br />(I cheated andcalled it «projecthistory»)<br />This is a «page» in Drupal terminology<br />(I linked it to the second menu item)<br />
  9. I linked a menu item to the «blog»<br />It links to a page that automaticallyhold short versions of the latest posts<br />Hey, something that wasn’t on the otherpage? That’s right, I configured this blockto not show on the front page(we’ll get to what a block is in a minute)<br />
  10. This is a blog post. Drupal shows this page when we click the title of the post<br />I cheated. These recurring elements of myprojects are manually formatted with HTMLwhen entering the content in Drupal<br />In «level 2» we’ll see how to do this better.<br />
  11. Now see how this was build<br />(installation not covered, Google=your friend)<br />
  12. Drupal has 3 default menus. Navigation is what you see on the left<br />Primary is what we have used here for our website menu<br />If you need a secondary menu, that’s what the 3rd one is for<br />You can rearrange stuff in Drupal by drag & drop using this cross <br />This is the adminsection. Only you<br />should see this<br />(kodel=my admin user name)<br />Everything in Drupal needs to be confirmed with a save button at the very bottom<br />Remember this, or you *will* cry<br />
  13. Here we tell Drupal where the menu link<br />should go to.Every piece of content(except blocks) is a node in Drupal.<br />If you want to link to<br /> a blogpost<br /> a page<br /> a survey<br /> a forum<br /> custom content (see «level 3»)<br />you need to look up the node number inthe admin section under «manage content»<br />The «node» is an important concept. You’ll understand it better when we define our own node types in «level 2»)<br />
  14. This menu link does not point to a node. It points to a built in page called «blog» <br />The “1” means it is the blog of the first user (by definition, our admin super-user)<br />We can also create pages that are not nodes ourselves (be patient, wait for «level 2» )<br />
  15. Navigation menu<br />Houston, we got a problem!<br />Website is finished, but now my users see these ugly things on the left<br />User login<br />
  16. Remove the user login bysetting it’s position to «none» in the blocks section of the site construction admin menu<br />
  17. Remove the navigation block by going in the settings of the block and removing the tick from the box for anonymous user<br />In Drupal, the user that is not logged in = anonymous<br />
  18. Hat tip:<br />If you can’t login anymore after hiding the login box, browse to<br /> http://yoursite/user <br />If you’re looking for the admin menuafter hiding that as well, try http://yoursite/admin<br />
  19. Modules used: almost none<br />Actually no modules are needed for this site, just FYI so you can google them<br />
  20. Level 2<br />
  21. Play the module game<br />This time, we’ll use some modules<br />CK editor -> text formatting<br />Views CCK -> a whole new world<br />Imagecache -> pictures with an edge<br />+ learn about users and taxonomy<br />Trick: hide admin menu and login <br />
  22. First, the easy part: users<br />(you can turn Drupal into Facebook, but we’ll not go that far)<br />
  23. Users can now log in to this site<br />BTW, here you see the secondary menu in action<br />
  24. Users are posting comments tothe site (on articles, news, pics,items in the shop, announcements)<br />
  25. Users also interact in the built in forum of Drupal(sorry, forgot the screenshot)<br />About the forum:it works strange – like an engineer thinks<br />You need to fiddle with the settings to have a flat thread view. And you need a module to disable comments-on-comments.<br />It’s ain’t pretty, but you can make it better <br />
  26. Some heavy lifting cck+views<br />(you’ll not get this from this presentation alone. But you’ll understand the concept.)<br />
  27. You can find modules that implement photo albums out of the box.<br />But please, take the effort to learn how to create one yourself with views & cck.<br />It’s much more flexible (you’ll need this) and you’ll learn how views & cck are working.<br />An album is a termin a taxonomy<br />This is the taxonomy term description<br />This is the picture that has the taxonomy term and has the flag «use as album cover» set<br />
  28. This is a custom block that uses our own defined node type «photo». We use CCK to define this own type.<br />The block displays the last 10 photos that are not used in the shop, unless the flag «use on front page anyway» is set.<br />Read the above again. Queries like this are generated by creating a view in the views module.<br />
  29. See these nice frames around the pictures? And did you notice pics are cut out square? And they have a little vignetting in the corners?<br />That’s all done with the nifty Imagecache module.<br />The composite image is generated automatically, no Photoshopping or CSS overlay involved!<br />(this is just so cool, can’t shut up about it)<br />
  30. Clicking an image in my self-created album pops up this overlay. It’s the Lightbox 2 module showing it’s glory here (it’s fully customizable)<br />
  31. After delivering the website, customer asked if she could showcase the inventory of her store without going to a full blown web shop solution.<br />I just created a new taxonomy, a new imagecache preset (no fancy frames here) and switched the output of the views module from grid to table, and voila!<br />This is a good illustration of the flexibility you get when using cck & views<br />
  32. A glimpse at the admin side<br />(module installation and setting of permissions for users not covered)<br />
  33. This is our own-created CCK node type<br />Don’t forget this tab. Here you define which imagecache preset is used to display the fields of your content type<br />These are our custom CCK fields. Note that the «file» field type also needs to be installed as a module<br />
  34. These are all views that I defined, you can browse to their URLThink of views as dynamic pages (potentially using custom content)<br />Although views can also generate a block as output<br />instead of a page<br />
  35. This is the editing GUI of a view. No comment. It’s rubbish.<br />Take arguments from the URL<br />(=sql where)<br />Choose your node type (=sql from)<br />Control the HTML output / paging<br />Define what you want to output here (= sql select)<br />
  36. Luckily, taxonomy is a lot simpler. My belly dancer adds new categories (sorry, in drupalish: terms) herself<br />taxonomy name<br />term name<br />
  37. Here you see that when she uploads content (a picture or a whole folder of pictures) she needs to choose a term<br />The nifty thing about Drupal is that all your content creation / editing / administration / publication flow works out of the box, also for content types you create yourself. On top of that, you can customize the content entry forms.<br />
  38. Modules used: a few<br />
  39. Level 3<br />
  40. I did it my way<br />Define all of your own content types<br />Don’t use standard content types<br />Dont’t use standard node pages<br />Don’t use blocks to display content<br />Define everything in views<br />Combine views on a page with pages<br />Find the HTML hooks for your CSS<br />Create template based on <br /> garland ninesixty fusion<br />
  41. No standard content in sight<br />(requires good thinking before acting, also called “information architecture”)<br />
  42. Dynamic rotation of content type «quote»<br />3 fields of content type «curiculum»<br />3 fields of content type «activity»<br />
  43. List of nodes of content type «project» with category of current activity (1)<br />4 fields of content type «activity»<br />
  44. A view showing<br />4 fields of content type «project», linked out of previous list (this view displays project 4)<br />A 2nd view on the same page showinglist of pics with link to this node (not taxonomy based)<br />
  45. 4 fields of content type «curiculum»<br />
  46. We only use custom content types<br />Forgot to delete the default Drupal content types<br />
  47. You see that the form to create/edit content is also split up in the different field types.<br />Each field contains descriptive text for the user/admin (customer) entering the content<br />
  48. If you’re not into CSS, use a pre-formed layout (you can also add blocks to the layout instead of views)<br />Use this if you hand-craft your CSS<br />The panels module allows you to output more than 1 view on the same page<br />
  49. Modules used: quite a lot<br />
  50. Bonus Level<br />
  51. Good base templates: garland, ninesixty or fusion<br />Every view generates it’s own classes and ID’s that you can use in CSS<br />problem: output code is bloated with classes.solution: create own classes / template engine<br />Always add your custom css to a custom file. Check the template engine of the base template you use to find out where to put it.<br />
  52. Summary<br />Basic Drupal is easy. Make sure you understand<br /> node, user, taxonomy<br /> default content (blog, page, …) and blocks<br /> download a template and play with the customization<br />A bit more advanced<br /> learn how custom content types work with CCK<br /> learn how to display them with views (and link to them)<br /> use taxonomy to knit things together<br /> play with imagecache, just for the fun of it<br />Loose the newbie hat<br /> make a site without default content types or node display pages<br /> style it completely with a custom CSS <br />
  53. Thankyou!<br />This presentation in380 pages. Nice if youdon’t want to trial anderror as much as I did.<br />CSS for newbies. Still gotto spend a lot of time with this book before I speak fluently CSS.<br />Love the series, neverread this book. Hope they don’t mind me using the trademarkin this presentation.<br />