I have a main menu with 2 topics, each of those 2 topics have sub-topics. I know how to make the menu for those, by adding them in the menu, and selecting the proper parent, to create the heirarchy.
Now, when I create a story that is a child of one of the sub-topics, how do I tell drupal that this new story is a child of topic 2, subtopic 1, so that the proper menus maintain their state?
I could create a menu item for every page/story, and select the proper parent, and then just disable the menu item (so ALL my pages don't show up on my menu), but I really don't think that's the way it's designed to work.
I've created, deleted, and re-created my test site no less than 5 times trying to figure out how to do this right!
Thanks!
Comments
Anyone?
I thought my question would be pretty easy to answer... Maybe I don't understand the way I'm supposed to be using it?
Help? :)
Be patient
Hi,
First of all, bumping a topic after four and a half hours is a bit quick. I know that it's a pain to wait if you're stuck, but bumping a topic hardly ever helps to get your question answered any quicker. :) With that said, let's see if I understand you right. Because as I understand it you want to create a setup where you have something like this (I don't know what topics you want to use, so I'll use some example items):
First, you need to create two vocabularies (admin/content/taxonomy): Movies and Music. To the Movies vocab you add the terms: Scripts and Reviews. Add the other two terms to Music. Next, edit both vocabularies. Add all the content types that you want to use with a term (subsection). For a simple setup, this might be page and/or story, more complex setups might incorporate additional content types. You can probably leave the other options as is for a simple setup, but you may want to decide if all submitted content must be associated with a subsection. If so, make sure to check the Required checkbox. Make sure to save all your changes.
Next, open up a new tab in your browser and go to the menu setup page (admin/build/menu). You can now create your six menu items (menu item ==> url path):
The numbers one through four correspond to the term id associated with it. You can find the term id by going back to the tab that you left open in the taxonomy setup and list the terms for each vocabulary. Hover your mouse over each term's link and you'll see in the statusbar a number in the url. That's the term id for that term. Note that the Movies menu entry lists both scripts as well as reviews.
Finally, create a test page or story. If everything went right, two dropdown boxes (or list boxes if you allowed multiple selects in your vocab setup) were added to your create form, one for movies and one for music. Make sure to select one and submit the form. The page / story should be available through the corresponding menu item if the page / story was promoted to the frontpage.
Caveats
In this example, we've created two vocabularies. This also means that you get two selection choices when submitting new content. This is not always desirable. There are two ways to circumvent this problem. The first is to create one vocabulary, instead of two. Naming the vocabulary might be a bit tricky, but often a general name like Sections works fine.
The second way is two create additional content types (admin/content/types), for example page_movies and page_music. In your vocabulary setting you than associate each content type to their corresponding vocabularies. If you work with many content types, this setup is probably not smart to use though, as you might need to duplicate each one. Also, note that if you do not make a vocabulary required to be selected, you might end up with unclassified nodes. These nodes won't show up through the menu, as you linked each menu entry to one or more taxonomy terms.
You can learn much more about taxonomy in the handbook. When I started with Drupal I struggled a great deal with the whole taxonomy concept, but I encourage you to look into it. It's a great thing to order your content.
Hope this helps to get you started.
I appreciate the reply -
I appreciate the reply - that REALLY clears up some other confusion I had about taxonomy; But, here is my question, using the framework of your example:
Let's say I create a new story called "Simpsons Movie Review" and select the term movies->reviews.
Now; to navigate to my new "Simpsons Movie Review" story, I would click on movies, and the navigation menu expands, listing all my terms. I click on Reviews in the menu, and all stories in the reviews category are listed in the main content area (and my movies menu is still expanded). Now, when I click on my new "Simpsons Movie Review" story link, all navigation menus collapse which is NOT what I want to happen. I would like to keep the movies menu expanded, showing all terms for movie when I click on "Simpsons Movie Review".
How do I tell the system that when I'm on the "Simpsons Movie Review" story page, that I want the movies menu expanded, WITHOUT making a new menu item for the "Simpsons Moview Review" story???
Is my question clear? Maybe this isn't possible, but it seems a bit tedious to have a new menu item for each and every story on my site. I would probably end up disabling them all except for my taxonomy / term structure links.
Thanks again for your clear explanation!
Not out of the box
I know what you mean. I've run into the same problem on the site I'm currently developing. It also happens in your breadcrumbs. You can't solve it out of the box, though. What you want for the breadcrumbs is the Custom breadcrumbs module. I'm not 100% sure if a module exists to fix the menu item, though. I'll check and get back to that later. I also need this fixed, anyway. But first, custom breadcrumbs. Install it and let's run through your Simpsons movie example.
First, you navigate to the custom breadcrumbs settings (admin/build/custom_breadcrumbs). Next, add a custom breadcrumb by clicking the link and select the content type, story in this example. The next two textareas control how the breadcrumb is going to look. The placeholder fieldset shows a legend with all tokens that you can use. These tokens are dynamically replaced, depending on the actual content. For the two textareas, use this:
Titles:
Paths:
Now, if I wrote it all down correctly, when you submit the Simpsons movie review story, the breadcrumbs should link to the correct places. Next stop: fixing the menus. I'll see what I can find. :)
I've searched through the
I've searched through the great depths of google, and I guess I'm somewhat surprised I couldn't find an answer to this, or anyone else with a similar question to mine. Maybe I'm just extremely particular about navigation consistency :)
It would be nice if there was a field (just like in the menu options) where you could select the parent item of the current node, and that would tell it where you are in the menu heirarchy for both breadcrumbs and menu state.
I've tried just selecting a parent in the menu options, and leaving menu title blank, but obviously that doesn't work.
The custom breadcrumbs idea looks good, and it would be nice if there was a custom menu module just like it!
Menu trails
I found a module called Menu Trails. Make sure to read the readme. Did a quick, clean test setup and it seems to do the job. I tried it out on the Garland theme, but it wasn't immediately obvious it worked. Turned out that the .active classes in the style.css file for the primary and secondary menus don't really make the menus pop out. Something to keep in mind.
Hey... it works!
It also takes care of the breadcrumbs too!
Thanks a lot!!!
No problem
I had to dig into the issue myself too, so now was as good a time as ever. :)