Starting at the top

First off, let's check that the necessary node types are in place. Make sure that you have two node types available on your site, called news and blog. Your node types don't have to have these names exactly - for example, you can use the built-in story type instead of news (in fact, that's what you'll see is being done in the screenshots), or you can use flexinode to create whatever other types you want - but these are the names that will be referred to from this point on in this tutorial.

Next, we're going to begin at the top, by creating the articles containeri. Go to create content -> container, and enter the title and body text of the node. Expand the container information box, and you'll see a whole lot of fields that might, at first, look a bit daunting. Skip the description, help text, admin title, and types fields, and set the hierarchyi field to single. Skip the 5 check boxes below.

The next field, hidden containeri, is one that often confuses many new-comers to the categoryi system. We'll discuss exactly how hidden containers can be used a bit further on. For now, leave this field set to disabled and continue on. The next 2 fields - parenti and weighti - can also be skipped.

Now we come to the depth field. At this time, it would be wise to look back at our site's aims, and to see how we can best meet them. According to our aims, we want all news items to be shown on the news page, and likewise for blog entries. We want all items listed on news and blog, however, to also be listed on articles. The news and blog pages are going to be categories, but articles is a container. Content can be assigned to categories, but it cannot be assigned to a container. So how can we get content listed on the articles page, when we cannot assign anything to it?

We do this by specifying a depth for the container of more than 0. With a greater depth, the container will list content that is assigned to categories below it. Just to be on the safe side, we're going to give the articles container a depth of -1 (infinite), so that all content assigned to pages beneath it gets listed on the root page.

Next, ignore the distant parentis box, and go down to the category display settings box. Set the show prev, next, and up links field to disabled, and leave the link to distant neighbours check boxes unticked. Set the display TOC within this container option to enabled. Leave the depth of TOC box set at 0. Unlike the main depth field, the depth of TOC field treats a depth of 0 as meaning 'show only the direct children of this node'. Leave the show assigned nodei count in TOC and show links to categories on assigned nodes boxes unchecked, but tick the show message if no posts and the show node listings checkboxes.

Finally, we're down to the all-important category menu items box. Set menu items within this container to enabled. This creates a menu item for this container, and for its categories (if we give it any). Leave menu items for assigned nodes set to disabled. It doesn't really matter what you set this to, because we won't be having any categories in this container, and hence we won't be assigning categories to any nodes.

Creating the first container
Creating the first container, which will hold everything else, and will list all dynamic content.

That's about it. You can set any other, non-category-related fields on the form to your desired values, and then go ahead and submit the node. Congratulations - you've now got your first container set up!

page up links

hi Jaza,
thank you for creating this powerful module and writing a tutorial. I did what you said on this page. However, my new node does not have the page up page down links.
http://www.drupalecommerce.com/node/94

I'm using 4.7.0b6, not HEAD, but I assume that's not the problem. is it possible there should be a node.tpl.php file in the tarball? I downloaded todays (3-27) tarball. what do I need to do to get those links? I can give you admin categories privileges on my site if you want to see what I've done right or wrong. The enable page up and page down box within this containeri is checked.

thank you, ae

Container Depth and Views Module

It appears that containeri depth only works when a categoryi view is not applied (because of the taxonomy id argument?). Can anyone confirm this? Is there a workaround?

Thanks.

Docs Need Serious Revision

Forgive me if I seem to be taking my general frustrations with Drupal out on your potentially very useful module, but your documentation (this "basic" hybrid tutorial in particular) is an absolute mess.

I've been reading it repeatedly for three days now, and although I have managed to reproduce in Drupal the exact structure you describe, I would not describe the process as simple (which you do several times). More importantly, I have not been able to "take away the lessons I need" to fit the aims of my own site.

First order of business: presentational logic. The instructional steps on each page need to be separated and formatted as numbered lists. The tightly spaced paragraphs and barely discernible italic terms are practically unreadable, and do not match up conceptually or visually with the Drupal forms to which they refer.

Secondly, the terminology you use to refer to specific form fields is not consistent throughout the tutorial, nor does it always match up with the text on the actual forms. This may be because the module has since been updated, but in any case, the docs need to catch up to be of any use.

Ideally, I would love to see detailed, blockquoted lists of the fields on other node forms that are added, deleted, or affected by making changes to the categoryi or containeri node in question. (And let's not forget the things that change, or don't change, depending on the order in which they are created and updated.) Neither your features list nor your existing glossary is comprehensive enough to fit the bill here.

If I could find this information anywhere else online, I wouldn't be bothering you about it, but as this is the home of the category module, it really should be present here. If you intend for the use of this module to become standard practice, especially among newer Drupal users like myself, you shouldn't let your documentation make the learning curve any steeper than it already is.

Completely Agree

The only way I got through the tutorials was to,
1. copy the text
2. hit enter to separate out the individual instructions

Its absolutely impossible to follow along otherwise. A screen shot showing all of the options would make it very easy to follow along as well.

I've been using the tinymce module which lets content be formated much more nicely.

hi Jaza, First off - thanks

hi Jaza,

First off - thanks so much for the Category module! It really seems amazing and the documentation and demo site really make it more approachable. I've started digging into it all and I really like what I'm seeing.

That said, I was wondering if I could ask you to sound off on my plans to use Category module for my site. Here's what I need to create (note: cute categoryi/containeri names for easier explanation, the site is actually for science research):

MENUS:

ANIMALS [Category] // as a menu item, this should not link to or display a node - it's merely a holder for:
- CATS [Container]
-- page on caring for animals*
-- page on caring for living things**
- DOGS [Container] // similar to "Cats" above
-- page on poodles
-- page on terriers
-- page on caring for animals*

PLANTS [Category] // similar to "Animals" above; clicking on "Plants" menu item just expands the category, it doesn't show new node content
- TREES [Container]
-- page on caring for plants
-- page on caring for living things**
-- page on elm trees
- GRASSES [Container]
-- page on caring for plants

* link to same node within a category
** link to same node across multiple categories

BREADCRUMBS:

a couple requirements for breacrumbs:

1. Referencing same node from different containers:

CATS > node on caring for animals AND
DOGS > node on caring for animals

are the same node. So I need the breadcrumb for both of these to be:

ANIMALS > CATS

2. Referencing same node from different categories:

CATS > node on caring for living things AND
TREES > node on caring for living things

need the breadcrumb to be:

ANIMALS > CATS
PLANTS > TREES

3. I only need to show breadcrumbs for this portion of the site. In other words, I don't need "home > yada yada > ANIMALS > CATS". Just "ANIMALS > CATS".

ASSUMPTIONS:

It's my understanding that the node that is created for each container is themeable. I need to list the titles of the nodes within that container and format them with template.php, theme overrides, the whole shebang. Is this accurate?

I know this is a long post. Thanks for reading it through. Any advice you have would be most helpful. I would even find it helpful just to know what of this can be done with the Category module and if I need to look elsewhere to augment it.

Cheers,
Andy