I'm having a brain tumor over here trying to do proper hierarchical navigation. I don't want to do it wrong, ie) manually, because I want it to scale with the growth of my site.

My requirements are painfully simple and seem to be common/appropriate: When someone creates a piece of content of a specific type I want them to be able to select where that goes in the navigational structure. Then I want the navigation to appear in blocks, pages would be nice for each block node with children - but not necessary. Optionally, I'd like to restrict users from placing content under nodes that already have children that are not content (like when I try to post a new Forum Topic in Forums: General)

For instance, if I placed this new piece of content under node B, and it was under node A. The navigation starting at node A would look like this:

ul
li A
ul
li B
ul
li link to this content /li
/ul
/li
li C /li
li D /li
/ul
/li
/ul

Given that, I could use CSS and javascript to make the navigation look the way I want it to. I'm trying to do this now with categories with vocab and terms. The problem now is it won't build the HTML list like it ought to. I tried the category module but it confused me even more, especially the tutorial + the fact there are already categories in drupal. No where does it really say what the module does.

Either way I don't care about the wrong solutions, I would really like some quick advise before I burn out learning the wrong stuff.

Thanks in advance - and again, thanks for making this a successful project by participating in the forums with your knowledge

Comments

derekwebb1’s picture

First of all. Categories will be a pain... You'll see.

I use taxonomy and created a block for just such a thing. You can take a look at how it works at my site.

When people create content, they are given options of what term(s) to place thier content into. You have to manually place the topmost vocabularies into the menus though for it to work.

If you want to use the categories module then... good luck!

Best regards, Derek Webb
http://makefunds.com
eCommerce made easy!

JamoSmith’s picture

That doesn't really help, how do I create a block to display taxonomy and it's hierarchy of nodes/sub terms. I don't want to use the Category Module, I've already learned that.

vm’s picture

taxonomy menu.module may be worth investigating ?

JamoSmith’s picture

That looks interesting. But it puts them into the menu block and doesn't display content as links, instead it displays the taxonomy terms as links. Which is the opposite of what I desire. I think I'm going to use some custom php per category block? Would anyone care to lend a hand at doing this with me?

I think each block would get some php like this:

for each taxonomy in category "First Category"
display all of its children as either parents or as leaf nodes, if they are leafs display a link to them

that would generate the ul, li HTML for each block

what do you think?