N00B Here,
I am getting started with Drupal and have hit the wall :) I am having problems wrapping my brain around the menu system. I bought and read a Drupal book, watched the Lullabot video on menuing, and have read a fair amount of forum posts but I am just not getting it. I think it has something to do with categories, bu I don't know the menu link syntax to mak this work.
I understand how to make a menu item that opens up a single node. I just can't seem to figure out how to have as single menu item open up a set of nodes. For example on my site I want to have a menu block that is called "Resources". Each menu item in this block would display a different group of resources. For example the menu item "Engines" would display nodes about engine resources and the menu item "Brakes" would display nodes about brakes, etc.
In this same thought, how would you control how the multiple nodes were presented? For instance having them list out teaser style vs showing a full page for each node with a way to see others. I guess another option would even be a list of links to all the page? So many choices :)
Thanks in advance for any help on this!
Comments
Categories
You can do this using Drupal's taxonomy function to categorize your items.
Say you had a category called Engines which was category 1, and another for Brakes which was category 2 you would add links to your menu in the format:
?q=taxonomy/term/1 -> this would take you to the Engines category
?q=taxonomy/term/2 -> this would take you to the Brakes category
If you wanted to list everything from both the Engines and the Brakes categories it would look like this:
?q=taxonomy/term/1+2
If you want to control how the items are displayed, then an alternative approach would be to have a look at the Page Snippets in the Drupal Handbook and find something that can be used to display things the way you like; create a Page using the snippet and then link from your menu to that page.
Hope that helps.
Could you spell that out in a little more detail?
Stupid newbie question....
I am not seeing what you mean by "add links to your menu in the format ?q=taxonomy/term/1"
Where is this done? If it is a page, where does one put that code? the stylesheet, the template page, or within the drupal admin?
...and gswaim - if you get this working, can you post a link to share this with us? I would love to see it in action.
There are no stupid questions.....
To do this, you would go to the admin area of drupal, and select menus.
Click on add menu item and in the 'Path' box enter
?q=taxonomy/term/1
You need to set the number to the correct one for the category you are linking to. As mentioned in the previous message you can link to multiple categories in the format:
?q=taxonomy/term/1+2+3+9
Hope that makes sense.
The menu always links to one page only.
What you must figure out is how to group all the nodes you want in one page. There are several ways to accomplish this.
Taxonomy is one of them, as explained above. But there are others:
- Outline your nodes to be child pages of a Book, then make your menu pointing to the parent page. That parent page will display a list of child pages' titles with links to full nodes.
- Create Views with the View module. You have several options to filter the nodes you want, and what part of them (titles, teaser, bodies) you want.
- Use PHP snippets that shows teasers, titles or bodies of nodes, filtered by taxonomy, node type, date, author or whatever.
- etc
Durval Tabach
Durval Tabach