BLOGWITHOUTALIBRARY.NET

libraries, technology, UX, &c.

POSTED
8 Nov 2008, 19:38

TAGGED
,

on drupal, part two

If I had to pick the single most useful module out of that whole list, it would be an easy choice: CCK. It’s a super-powerful module that allows you to define content types across your site and create custom fields for those content types.

So, say you want to create subject guides on your drupal-powered site. You could use the standard “page” template that comes with the basic install. A page is pretty simple and looks something like this (on the back-end):

page template sample

Nothing fancy really, it’s pretty much like any other form you might expect to see in a CMS. In our subject guide example, you’d put all your content in the “body” field and that would be that. Which is just fine, but wouldn’t it be better if your subject guides had fields that matched your content? If it did, it might look something like this: (again, on the back-end):

subject guide template sample

Creating templates like this is what CCK does. With CCK, you’d create a new content type (call it “subject guide”) and then define what fields you’d like to see on that guide. While it probably looks like a lot of work to create custom content types when a simple page template might do the trick, I’d say it’s worth it for a number of reasons:

  • custom searches: with the example above, your users can choose to just search your subject guides (or any other content type you define).
  • feeds: you can generate RSS feeds for any (or every!) content type so your users can choose to subscribe to the feed for just your subject guides (for example).
  • content display: because your content is pieced out into different fields, you can choose to display the data from any of those fields in different ways. For example, if you’ve created subject guides for every subject in the Humanities, you can generate a list of all the article databases in the Humanities by creating a view that lists the content in the “article databases” field. With the Views module, you can customize the way your pages display just about any way you’d like.
  • admin: CCK makes site admin easier for a lots of reasons, ranging from making it easier for content contributors to add content to your site to making user permissions more manageable.

I’ll pick up on the admin stuff in my next post, but for now, I’ll leave you with a list of the custom content types we’ve defined for our site. This might be of limited value since some of these are pretty specific to my library, but I would have loved to have seen similar lists when we were developing our content types (and when I went hunting for them, I came up empty). So, here you go!

Next: on drupal, part three.


2 Comments

Posted by
Felix
9 Nov 2008 @ 12:42

This is exactly what i need right now. Were using drupal on our site for library soon and we want to make subject guides for our patrons. This is very helpful to us!!! Thank you!!! (Please excuze my poor English I am from Portugal).


Posted by
ThisGlobe.com Blogs » on drupal, part three
10 Feb 2009 @ 00:08

[...] here. Then go here. Then come back [...]