Is it possible to list all the terms in a vocabulary on a page with its content in a list with link?

for example:

Term 1:
- list node 1
- list node 2
- list node 3
Term 2:
- list node 1
- list node 2
Term 3:
- list nod 1

Comments

tyswan’s picture

Hi ptrl,

The title of your post implies that you want to list a tree-like structure of child terms for a vocabulary (in which case you could use Table of Contents in the categories module)

But the body of your post looks like you want to display the first level children fo a vocab, and show the nodes (ie. content assigned to the child term).

I'd like to help out, but I just need to understand your question a bit better.

Thanks,

--
tys

BLUE MOUNTAINS health & harmony
www.health-harmony.com.au

building an alternative health & spirituality community in the Blue Mountains

detot’s picture

I shall try to explain a little bit better :)

the menu should look something like this:
- Home
- Projects
- About

when you click the projects link for example. the page (not the menu) should display the terms and its nodes.

so the content will display a (ul) list with every node title for every term. So it's possible to click the node and get to that page.

Perhaps also the terms should display as a submenu for projects.

2houseplague’s picture

detot’s picture

the article module just shows the terms and how many nodes it contains in number i want to write out the title for every node.

tyswan’s picture

Okay, I get the picture a little better.

Will you want a pager when you get more than say, 20, nodes on a page, or is your site only small?

Anyway, I can't think of a proper solution right now (being past my bed time ;)), but a very quick and dirty solution is to use the menu system as you implied.

Try creating a menu for the headings you have specified, and assign the pages to the correct menu. The menu module should automatically give you a block which you can insert into the body of the appropriate page.

ie. when you click on Projects, you go to the Projects page. On the projects page, you can insert the "Projects menu" block into the body of the page itself using code from this post: http://drupal.org/node/26502

The only other way I can see to do this is to hand code it by borrowing the tree-building algorithms from the articles or taxonomy modules, and invoke an additional call to retrieve the nodes too. This would be very slow, depending on the complexity and size of your taxonomy structure.

To be honest, I'm not sure what you really want to do.

In my site, I have a top level menu, similar to what you have:

-Home
-Directory
-About

When I click on About, I get the top level children in the taxonomy, and then a list of any nodes that have been assigned to About (none in this instance). But "Information for Businesses & Practitioners" has both children, and assigned nodes.

It isn't exactly what you want, but it was as simple as installing the Category Module, and working out my taxonomy structure.

Sorry I can't help you more. Good luck with your project,

--
tys

BLUE MOUNTAINS health & harmony
www.health-harmony.com.au

building an alternative health & spirituality community in the Blue Mountains

detot’s picture

check out this navigation. That what I'm trying to do, is it possible to do in Drupal? look at the breadcrumbs, url, etc.

no pager but the project items should be easy to and more.

joestewart’s picture

The sitemenu module can display a list of one or more vocabularies and its nodes.

http://drupal.org/project/sitemenu

detot’s picture

that is almost the thing im looking for. the problem with that is called sitemenu, and the link is sitemenu (easy path fix). And another problem is that is gives the list a menu class so it gets the same styling as the navigation and ad the Title of the vocabulary.

tyswan’s picture

I haven't used the sitemenu module, but you can always edit the module to change the name (I'm assuming you mean what's shown at the top of the page), or supress the title using CSS.

You should be able to style the menu items in the page content to differ from the navigation menu list items, since the site menu will appear in the content of the page, not the navigation. Most themes will have a "content" div to wrap all page content, so you just need to override the menu class for when it appears in the content div.

Hope that helps.

Cheers,

--
tys

BLUE MOUNTAINS health & harmony
www.health-harmony.com.au

building an alternative health & spirituality community in the Blue Mountains

detot’s picture

thx for the help, think i have it under controll now.