Creating a basic hybrid structure
This tutorial will teach you how to create a basic hybrid structure using the categoryi module. A hybrid category structure is a bit like a hybrid animal (more resistant to fleas), a hybrid car (makes all your friends jealous), and a hybrid towel (even more useful than a regular towel).
A basic hybrid structure is also a hyped-up term, as it deliberately exploits the term 'hybrid' as a buzzword, in order to pointlessly exaggerate the greatness of the category module. I think it sounds alright: it manages to actually convey some meaning, while also sounding very impressive with its seeming sophistication.
Anyway, moving on to the useful stuff...
A basic hybrid structure is the simplest and most common way in which you can combine the usual structures that are possible with the book and taxonomy modules. In this tutorial, you're going to learn how to create a basic hybrid structure that looks like this:
As well as simply creating the structure, you will be introduced to the various options for navigation and display that can make it more usable for your site's visitors, and more maintainable for your site's contributors.
Assumed knowledge for this tutorial
Before continuing, you should already have the category package installed on a Drupal system, and you should be familiar with the steps involved in creating and editing categories and containeris. This tutorial is not concerned with teaching you the basics of using the category module (which you should already know, if you're familiar with the basics of using any node types in Drupal). Rather, it focuses on a particular strategy that you can employ when architecting your site with categories.
You don't have to be particularly familiar with all the settings available to you, when configuring your categories and containers. The idea is that as you go throguh this tutorial, you will be introduced to many of these settings, and will learn how to use them to your best advantage.
Note: it is assumed that you have the category, category_menu, and category_display modules enabled.
What are we trying to do?
For the purposes of this tutorial, we're going to be creating our category structure with these aims in mind:
- Our site will have two node types (apart from category and container), called news and blog, and these node types will be used to create dynamic content
- All dynamic pieces of content will be listed on the articles page of the site, which will sit as a top-level page (with only home above it)
- All news items will be listed on the news page, and all blog entries will be listed on the blog page - each of these pages will be underneath the articles page
- All news items will be categorised by topic, and all blog entries will be categorised by topic and by mood (the news topics will be different to the blog topics)
- The news topics will all be listed beneath the topics page, which will be beneath the news page; and the blog topics and moods will be listed beneath the topics and moods pages respectively, which will in turn be beneath the blog page
- Although news items and blog entries will be listed in 3 different places (i.e. articles, news / blog, and the various categories beneath), their actual position in the structure will be beneath news and blog respectively
- The breadcrumbs, menu links, table of contents links, and navigation links must match this structure perfectly
These aims will not be exactly the aims that you have for your own site. Everybody's aims are different, and this is why the category module tries to be as flexible as possible. But hopefully they are similar enough to your needs that you can spot the similarities, and can take away the lessons that you need.
Uhh...
Not really. Category_menu works by creating menu items. Menu items are then used by the core menu module to set breadcrumbs. No menu items equals no breadcrumbs.
But when you use the 'enabled (but disable each item)' setting, you should only be seeing the breadcrumbs, not the menu links in your navigation. How is this a problem? How will lots of menu items become unwieldy? They're all invisible (except for the effect that they have on breadcrumbs). And Drupal is able to cope with thousands of them (I believe benchmarking has been done with more than 10,000, and has given good results). And categoryi_menu maintains them, so that they continue to match your category structure should you change it.
Override theme function
To show the TOC above your node's content, simply override the theme_categoryi_view() function in your site's theme. Your custom theme function would look something like this (only the bit that needs to be changed is shown here - the rest is snipped):
<?php
function mytheme_category_view($node) {
// snip.. all code in here can be the same as for theme_category_view().
// Allow other modules to add additional output.
$extra = module_invoke_all('category', 'view', $node);
$extra_output = '';
if (isset($extra) && is_array($extra)) {
foreach ($extra as $key => $value) {
$extra_output .= $value;
}
}
$node->body = $extra_output . $node_body;
// snip.. all code in here can be the same as for theme_category_view().
}
?>Hope that helps.
Possible, but discouraged
In the Drupal 5 version, it is possible to have a categoryi with multiple parenti categories, and to also have menu item generated. The parent of the menu item is the parent category with the lightest weighti.
In Drupal 6, the use of multiple parents has been limited significantly. The new rule is that you cannot use multiple parents for any categories in a given containeri, if you want category_menu to generate menu items for that container and its categories. Basically, breadcrumbs / menu-links and multiple parents do not mix well.

A few possibilities
What you want to achieve is certainly possible with the categoryi module and Drupal 4.7 - but there are a few different approaches you can take.
The easier approach would be to create your 'primary links' menu items using the built-in menu module, rather than the category module, and then to create menu blocks with menu items for each of your second-level menus (which would be in containeris that have one of the top-level pages as their distant parentiis).
The harder approach would be to actually use the 'secondary menu items' mechanism as your side menu block. Since secondary menu items are displayed by default (in most themes) along the top of the page, you would have to override the default display in your site's theme, to show the secondary links as a side block. This might actually work better in the long run, since you could have all your pages as categories within one container, and you might not have to worry about distant parents at all.
But anyway, all of this is quite complex stuff, and as someone who's new to the category module, and to Drupal in general, I think you should do a lot of exploring and learning first, before you dive into tasks such as this. ;-)