Drupal: How to build a categorized menu tree -
i need build custom menu structure based on taxonomy terms. problem first level should taxonomy-term. nested items must node. each node can have one term. , terms without nodes associated should not appear in menu.
how that? suggestions me?
example menu:
term-1 node-1 node-2 node-3 term-2 node-1 node-2 ...
thank you.
edit need photgrapher website. each term global categorie portraits
, or artists
. categories wrapper galleries. based on example menu above possible structure this:
series (term) bodies (node:type->gallery associated term:series) classic cars (node:type->gallery associated term:series) surroundings (node:type->gallery associated term:series)
i suggest doing view. want create view lists nodes, , set view group taxonomy term.
so, create new view (admin/build/views/add)
- view type: node - name view, , proceed next page.
- filters
- node: published - yes
- node: type - gallery
- [optional] taxonomy: vocabulary = series - hide galleries have not been assigned series.
- fields - delete labels fields add them
- taxonomy: terms - use taxonomy: term, if have more 1 taxonomy, such free tagging, free tags show too, terms better because can limit vocab.
- check checkbox - exclude display
- limit terms vocabulary - series
- node: title
- check checkbox - link field node
- taxonomy: terms - use taxonomy: term, if have more 1 taxonomy, such free tagging, free tags show too, terms better because can limit vocab.
- basic settings
- style: unformatted
- click on cog change settings , set grouping field taxonomy: term
- items display : 0 - since not want pager, want display results.
- style: unformatted
- sort criteria - adding 2 sort criteria...
- taxonomy: weight - controls order groups - have set taxonomy term weights in taxonomy administration area. (you sort taxonomy: term if want terms appear in alphabetical order.)
- node: title - controls order nodes within each group.
Comments
Post a Comment