0

I would like to create a submenu that lists items based on content type and taxonomy. Here's the setup.

Shop for a Car [Basic Page]
    Financing Options for cars [Basic Page]
       loan 1 [Content Type: Loan / Taxonomy: Car, Home]
       loan 2 [Content Type: Loan / Taxonomy: Car]
       loan 3 [Content Type: Loan / Taxonomy: Car, Home]
Shop for a Home [Basic Page]
    Financing Options for homes [Basic Page]
       loan 1 [Content Type: Loan / Taxonomy Car, Home]
       loan 3 [Content Type: Loan / Taxonomy Car, Home]

Notice that loan 1 and loan 3 appear under two different parents. I know I can create this menu structure manually using NodeSymlinks. In that case the Taxonomy terms are not needed. However, I would like to generate the menu automatically using the terms for a particular content type. I looked into the taxonomy menu module but it only allows one parent and it lists the taxonomy tag rather than the items tagged. Any suggestions?

Thanks!

2

You could use views to create your links for the content types and then use the views field view module http://drupal.org/project/views_field_view as a field on that to show the child taxonomy terms associated to the content type.

| improve this answer | |
  • Thanks but how does this integrate with the menu? – sho Feb 18 '13 at 18:33
  • 1
    Well I never use taxonomy terms as menu items. It causes nothing but problems. Taxonomy is used to filter/group content, not for menu items. But by using views and some template magic, you can rewrite your output as a menu like you are needing. – iLLin Feb 18 '13 at 18:35
1

You can do it with Rules. This module: http://drupal.org/project/menu_rules adds some actions to rules. One of them is to create a menu item for a node. You can create two rules:

1.Rule:

Event: Create a node | Update a node

Condition: Content type is "Loan" | Taxonomy term is "Home"

Action: Update a menu item for node (there is a checkbox to create the menu item if it doesnt exist) -> Select "Financing Options for homes" for parent menu item

2.Rule:

Event: Create a node | Update a node

Condition: Content type is "Loan" | Taxonomy term is "Car"

Action: Update a menu item for node (there is a checkbox to create the menu item if it doesnt exist) -> Select "Financing Options for cars" for parent menu item

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.