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