I've played with Drupal for a few days now, and while I don't have a public site up yet, I'm starting to get my bearings. So I thought I'd write a little bit about my initial Drupal experience while it's still fresh in my head.

Positives first, just to start on the right foot:

1) The handbook (and the comments on it) are a wonderful resource. Even better, the search box _actually_ works. This is one of the first sites I've hit where the internal search works better than searching using 'site:' on Google.

2) Forums are great, searchable, and integrate nicely with the other parts of the site. Response to my first post was prompt, helpful, and by active developers who knew what they were talking about.

3) Install was remarkably easy and well documented. Downloaded it, read the well-written directions, and it was running!

That's when the going got a bit rougher. It's up and working, but how do I translate my mental model of the site I think I want to Drupal's reality? Now, I don't think I'm an idiot, especially when it comes to computers. I'm a UNIX native, I understand HTTP, I've written Apache modules, heck I've even written web servers. But trying to figure out how to actually build a site with Drupal I hit a wall. Not an insurmountable one, but that took several hours before I was even sure there was a solution.

Now, I know what a taxonomy is (although I was confused when it was called a 'vocabulary'), and the instructions for creating one are pretty clear, but I still don't know why I would want one. I think the answer is that since primary content is going to be created by me (with the users supplying comments and posts) that I don't want one. Instead, if I want to present a series of pages in a prespecified order, I want to using the 'book module'. But it took me a long time to figure this out, since all the documentation refers to this primarily as a means of allowing users to collaboratively write a book, which I am not doing.

My next problem was that I knew I needed some custom database interaction, but I had no idea how to achieve it: was there some way to write CGI that I could include into Drupal pages? write PHP that would be included into a page? write a custom modulet that would do what I want? It turned out that creating a custom node type with 'Flexinode' and then adding 'Node Relativity' will meet most of my needs, but it took me quite a while to figure out that these even existed. And since what I wanted to do (have one node contain another) seemed very basic, I was very confused that neither is part of the core system.

I think most of my problems had to do with mental models: when it comes to Drupal, I don't have one. The layer of documentation that was lacking for me was the layer that explained the Drupal mindset: a whitepaper, and architectural overview, some sort of rationale for how it all fits together. It took a lot longer to start to 'get it' than I would have hoped. Even at a basic level, I thought I knew what a 'node' was, but apparently I didn't. Oddly, the piece that helped it click together was a piece explaining how a node might be redefined in the future: http://jonbob.drupaldevs.org/cck/overview

Overall, I am excited by Drupal. I think it's going to work for what I want to do. Things I thought would be complex (forums, comments, user registration) are turning out to be incredibly easy, but I constantly feel like doing many simple things (putting two pages in order) is incredibly hard. Looking at the Roadmap (http://drupal.org/node/11512) it looks like some of this should be improving soon (particularly with CCK).

Anyway, that's enough for now. Back to trying to figure out how the pieces fit together.

Nathan Kurz

Comments

harald.walker’s picture

Now, I know what a taxonomy is, and the instructions for creating one are pretty clear, but I still don't know why I would want one.

To structure and categorize your content. It creates the tree (a simple traditional tree or a very complex one if you like), the foundation of your website. The nodes are the leaves of the tree. It also took me a while to figure it out. I am in the process of transferring 3 websites from static html to Drupal.

nkurz’s picture

I see how the taxonomy can structure and categorize the content, but what about ordering it? At the top level, the different vocabularies can be weighted, but I don't see any way of ordering the terms within a vocabulary.

For my site, I envision having a number of sections containing content that I create. Taking the first two, I want to start with an "Intro" section, and then have a "Howto" section. Without each of these sections are 5-10 pages that I want the user to be able to go through in order. I need the menus for these section to be layed out in a set order, and I need there to be a 'prev'/'next' style navigation between pages.

From what I can tell, the only way to do this is with the book module. So I take the pages, and add them to the outline (why don't I add them to the book? or why isn't it called the outline module?). Once I've done this, I have both the set order and the navigational system that I want. But once I've done this, I don't see why I would also want to create a taxonomy.

I see how I could, but I'm not sure what I would gain from it in this case other than the ability to view my structured content in an unstructured order. I suppose it would provide a way to keep track of content pieces that I haven't yet added to the outline, but I'm not envisioning having any of these. Am I missing something? In particular, is there a way to get ordering without needing the book module?

killes@www.drop.org’s picture

terms have weights too.
--
If you have troubles with a particular contrib project, please consider filing a support request. Thanks. And, by the way, Drupal 4.6 will support PHP 5.

nkurz’s picture

OK, with your hint I just went through and created a couple test vocabularies, and yes, you certainly can order terms within a vocabulary. Thanks!

So I guess if one wanted to, one could create a vocabulary to mimic the entire hierarchy of the site that one wanted (including leaf nodes), weight each term into the desired order, then assign each node in the hierarchy a unique term that would define it's order within the site.

Create a vocabulary: (number in parens represent weighting)
Intro (1)
- Basic (1)
- Advanced (2)
Howto (2)
- Basic (1)
- Advanced (2)

Then tag nodes (title in quotes, tag after arrow):
node-1 "Basic" -> Intro/Basic
node-2 "Advanced" -> Intro/Advanced
node-3 "Basic" -> Howto/Basic
node-4 "Advanced" -> Howto/Advanced

Or since the title is used for ordering in the case of identical weightings, one could ignore the weightings and just choose titles that sort alphabetically into the desired order ('1. Intro', '2. Howto') This would also mean that the leaf nodes would not require unique terms:

Create a vocabulary:
1. Intro
2. Howto

Then tag files:
node-1 "A. Basic" -> 1. Intro
node-2 "B. Advanced" -> 1. Intro
node-3 "A. Basic" -> 2. Advanced
node-4 "B. Advanced" -> 2. Advanced

Presumably one could also do something with multiple vocabularies if one wrote some custom display code:

Create two vocabularies:
Intro (1)
Howto (2)
--
1 (1)
2 (2)

Then tag nodes:

node-1 "Basic" -> Intro : 1
node-2 "Advanced" -> Intro : 2
node-3 "Basic" -> Howto : 1
node-4 "Advanced" -> Howto : 2

But as I mention in a comment further down, I still wonder if allowing terms to be weighted might be significantly slicker and smoother:

Create a vocabulary based on top level of hierarchy:
Intro (1)
Howto (2)

Tag files with weights:
node-1 "Basic" -> Intro (1)
node-2 "Advanced" -> Intro (2)
node-3 "Basic" -> Howto (1)
node-4 "Advanced" -> Howto (2)

Thoughts?

Jaza’s picture

In the absence of a proper node weighting system in Drupal at present (without the patches mentioned below, which I haven't tried), there is one other trick that you can use to order your nodes the way you want.

The way my site is set up, my theme settings are such that all nodes of type 'page' do not have their additional info displayed (i.e. author, and date of creation). So for my page nodes, I manually override the date of creation (can be done on the node editing form - no need for backend DB hacking) to an incorrect date, so that the date basically acts as a universal weight for that node.

Obviously this is not the ideal way to do it (especially if you need dates displayed for your type 'page' nodes, in which case correct dates would matter), but it works for me.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

travischristopher’s picture

geez, i hadn't thought of that?!? this is a great little hack, thanks.

Travis

gravyface’s picture

Perhaps Drupal is do for a jazzy AJAX-powered taxonomy GUI. I'd love to be able to "see" what my site looks like, ala Typo3, in a nice, expand/collapse/drag'n'drop style UI component.

robertDouglass’s picture

- Robert Douglass

-----
Rate the value of this post: http://rate.affero.net/robertDouglass/
I recommend CivicSpace: www.civicspacelabs.org
My sites: www.hornroller.com, www.robshouse.net

ramdak5000@www.drupal.org’s picture

If your mental model has anything to do with a hierarchical site structure and urls and breadcrumbs that reflect it, I suggest you read the following threads and the detailed 3-part tutorial by Jeremy that make these possible in Drupal:

Threads: http://drupal.org/node/16426 and http://drupal.org/node/17354
Jeremey's 3-part tutorial: http://www.greenash.net.au/posts/thoughts

If your needs are much simpler, then enable 'menu' in administer>modules and you can then create your own menu and sub-items.

Jaza’s picture

I tend to agree with nkurz's opinion, that translating a mental model of 'how you want your site to work', into an actual plan for how to implement that in Drupal, is still a difficult thing to do. I know that when I was conceptualising the mechanics of my site, I became frustrated that there was no obvious way to bring it all together and make it happen with Drupal.

I'm glad that my 3-part series is helping people (thanks for all your praise, ramdak!), but that is only a guide on how to implement one type of site mechanics in Drupal (i.e. a hierarchical structure, but without compromising on the power of taxonomy). What we really need is a handbook entry with a much broader scope, covering "how to turn your mental model (whatever that is) into a Drupal site". Drupal currently has a lot of documentation on how all the components can be used (e.g. taxonomy, blogs, URL aliasing, books), but not much on how to bring them together in a useful way, or on how to choose what components you need for your particular site.

Also, while I'm here, I found this remark quite interesting:

I constantly feel like doing many simple things (putting two pages in order) is incredibly hard.

Too right, nkurz! A simple thing like that should be easy, right? But Drupal doesn't let you do anything but list your nodes in chronological order. Other elements in Drupal (e.g. taxonomy terms/vocabs, menu items) use a weight system, where lighter items float to the top, and heavier items sink to the bottom. I've never understood why you can't give nodes a weight!! This is something that should be addressed in the near future for Drupal. Just my $0.02 worth.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

harald.walker’s picture

But Drupal doesn't let you do anything but list your nodes in chronological order.

And that's why Drupal still feels like a blogging tool to me. Chronological order makes sense for blog entries, events and news items but otherwise I would prefer more flexibility (custom order, alphabetical order,...).

tatonca’s picture

To expand on it a bit, I would suggest a series of tutorials, that each show how to implement a particular web archetype using drupal. The tutorials would complement each other, listing clearly what objectives each is going to explain and how. For example, a tutorial about "Creating a Company Intranet" would list objectives like "providing current news, maintaining a calender of company events, implementing an employee handbook,.." ect Then working through each objective would highlight which modules work best, and an explanation of why those choices were made.

A series of this type acheives several things. It relates what a new user knows (a common web design template) to what they don't (drupal). It explains the 'why' of certain modules by contexting them with the objectives. And it provides a 'quick start' guide to allow folks to get a prototype up and running as quickly as possible simply by following the tutorial. At the end they should have a good enough idea about what is going on that they will also make much better users because they will be able to ask informed questions...

ramdak5000@www.drupal.org’s picture

The only example of this kind is the Bryght.com guide:
http://support.bryght.com/adminguide/how-to/dynamic-web20-brochure-site-...

nkurz’s picture

I've never understood why you can't give nodes a weight!!

I agree that this is something that seems fundamental. It is, though, a bit trickier than simply adding weight to each node, though, as the weighting should not be associated directly with the node, but rather with the way that the node is being used. For example, the same node can have multiple terms associated with it, and perhaps one wants different ordering based on which term one is sorting by (apologies if I'm mangling the Drupal vocabulary here).

On the other hand, it seems like it would be easy to simply add term weighting to the taxonomy system. When adding terms to nodes, instead of simply associating a term with the node, one would associate both a term and a term-weighting (ie, not just a tag but a tag and a value). For example, instead of instead of tagging something as 'news', would could tag it as 'news'/-20 would tend to put it as the top of the list or as 'news'/20 which would put it at the bottom.

I could just be confused, but this strikes me as 'Wow! Powerful'. Because it would be just an additional field in the table, existing code wouldn't have to change. But display code that wanted to order based on the weightings could do so. Unweighted material could just fall back to the current temporal or alphabetical scheme. Navigational stuff that currently can only be done with the book module would be possible with just a smart taxonomy. Re-ordering would just be a matter of re-weighting the terms.

Does this seem plausible? And if so, is there a module that already does this?

moshe weitzman’s picture

a patch was proposed in this issue but never followed through.

nkurz’s picture

Thanks Moshe!

I found another patch which provides a nice summary of the other proposals: http://drupal.org/node/10839 Reading through these patches and related discussion, I feel more certain that having weightings associated with individual term/node combinations (in the term_node table) makes more sense than having a universal weighting for a node. The order one wants for nodes is context sensitive, and a universal order doesn't give enough control in multiply tagged system.

I started actually writing a patch of my own to allow for adding terms with weights to nodes (instead of just adding terms) but I ran into some interface problems that I could not solve. My plan was just to throw a form_weight pulldown next to the term pulldown, but this falls apart when multiple tags per vocabulary are allowed. In this case, a single select box that allows multiple selections is used, and there would be no way to distinguish which term the weighting would pertain to.

I don't see any easy interface here. One could have a separate term weightings form on some other page, but this seems clumsy and inconvenient. It seems like it needs to be done at the time the term is applied, but without resorting to a Javascript interaction between diferent form elements, I don't see any possible way to do it in one step.

So I'm giving up on it for now. Although I feel a bit like a second-class Drupal citizen, I guess I'll just have to accept that the book module is a good navigational solution for my site and I don't really need to use terms and taxonomies right now. On the positive side, I do understand their implementation a bit better now.

(and Jeremy's tutorial was a great read too. Thanks for writing it up!)

judah’s picture

Nathan makes a good point. I think about this everytime I start to create a new drupal site.

Once the site is setup and running I ask myself, now I have to create the pages I want and then somehow connect them to the navigation. How do I do that again?

What I suggest is that we have a module that displays a block that lists all page nodes and have it turned on by default. Basically it would just be a block that displays nodes by name and links to their page. Then as the new user creates his or her page and it will show up in that block. Simple. If they want more functionality they can go to the settings page and filter by category (vocabulary/taxonomy/subterm/whatever you want to call it), order them or apply a sort.

Of course it would be nice if it would allow multiple block instances so you could display different node queries.

I think it's important to fill the gap in the tutorials with these articles listed here. The one on bryght is especially important. That is what is missing when I was starting out. Can these authors contribute these back to the drupal help book?
It would also be cool to have tutorial on how to write node and category queries. I am learning about this so maybe I will when I get up to speed.

jaharmi’s picture

If it's not available currently, having one page to go to and get a list of all nodes would be a great addition. I'm used to that in the other system I've been using for years, Userland Manila.

In Manila, there is a "stories" page that provides an index to all stories (the equivalent of nodes) on the site. There are separate indices for shortcuts (glossary entries that act as links between pages in your site, and to outside URLs), pictures, and uploaded files (Word docs, etc.).

The stories index is basically listed in reverse chronological order, so it's easy to see what pages have been recently created. That's handy for editing them. However, I would have like to be able to view stories by topics/categories, and by path. In Manila you can assign any story to a specific path in their navigation tree, which is much like assigning a path to a node in Drupal. It's also somewhat like adding taxonomy terms to a Drupal node -- although there's a separate MetaData plugin that is really more like taxonomy. (Happily, one of the primary authors of the MetaData plugin, John Van Dyk, is working on Drupal and that's one of my reasons to be interested in the future of Drupal's CCK.)

--
Jeremy
www.jaharmi.com

sepeck’s picture

All content can be found in administer \ content.
In 4.5, lots to wade for. In 4.6, nice filter system.

Of course, this does not help poeple who don't have rights to see that section so a listing by type module would probably be nice.

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

chueewowee’s picture

A list of pages that I could display to the casual user would be nice. Not sure if I can do it automatically: i think not, uless I could do it via a php query in phptemplate?

-----------------------------------------------------
"It's never too late to have a happy childhood."

john manoogian III’s picture

> Drupal currently has a lot of documentation on how all the components can be
> used (e.g. taxonomy, blogs, URL aliasing, books), but not much on how to bring
> them together in a useful way, or on how to choose what components you need
> for your particular site.

Yes.

Are there Drupal gurus out there who could share their worldviews of how Drupal can create some common website "design patterns"? With Perl or Interwoven I know where to find the gurus. I've a list of experienced implementers who I can put the difficult questions to. With Drupal I'm too new to know who to ask about something as general (and as important) as "how does it all fit together?" Who are the Paul Prescods, the Mark Jason Dominuses (Domini?) the Paul Grahams of Drupal?

-- jm3

robertDouglass’s picture

John,

in terms of Drupal Design Patterns, this is a moving target and not yet well defined. I think even the smartes Drupalers are still experimenting and coming up with new combinations of modules and settings that make specific goals easier and more intuitive. I think that in the near future a lot of the work in this area will be found in the customized distributions that some people are putting together, Civicspace being the leading example.

- Robert Douglass

-----
www.robshouse.net
www.webs4.com

sepeck’s picture

There is also work on getting some instructions on a few different common site types. Your best bet is to describe the site you are trying to build out and see what various people suggest in the use of modules.

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

chx’s picture

it's a bit orphaned but works. i think i'll take over maintainership
--
Read my developer blog on Drupal4hu.

--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.

carlo-1’s picture

I am a Drupal newby. That's why I think I can ask the best stupid questions. I will try to answer them myself and organise my findings in the administrators handbook. Please sent me some comment.

Carlo

parakeet’s picture

I agree with the original post. I've been trying out Drupal for a few days and, whilst it seems remarkably flexible and many-headed, I'm just not sure how to accomplish certain things that you'd expect of a website, within a strcture that doesn't just rely on a lef-column, right-column method.

tomski777’s picture

nkurz thanks for starting this thread, its provided really useful insights during my first forays with Drupal. After much deliberation, I've taken the same path as yourself and have settled on the book module as the most efficient way of creating a small site of only 20 pages or so, but this will grow very soon, so I am working hard to create a solid base to facilitate this. I have also found the book module to have the most easily understood interface for other users contributions. What I'm experimenting with next is:

1. Using the Taxonomy system to filter hierarchical content, which is as much of a design issue as anything else i.e. Starting from what do I want to achieve & then deciding on the appropriate technology to use.
2. Make a book appear in multiple places.
3. Implement a path alias structure. I think this could be a key area to develop with Drupal & may be the place to create a high level structure to attach all nodes, much like Jeremy outlines in his 3 part tutorial (link is in a post above).
4. Create a primary menu, where a menu item stays highlighted when a child of a book is clicked on. At the moment primary menu items un-highlight when going more than one level deep within a book... any tips for this please?

As an aside, I really don't like the names of the modules - story, page, book. Those names are the one thing that really got in the way of me understanding the core components of Drupal. I always got the feeling that I was "doing something wrong" because I wasn't writing a book or story etc. names which relate to their functionality would be better, though I can see the reasoning behind current choices.
-------------------------------
><>tomskii
><>www.mutinyarts.co.uk