2

I have a taxonomy menu block using the vocabulary 'Projects' that links to the terms: 'Bridges', 'Buildings' and 'Boats'.

Currently, each menu item links to a page that lists teasers of all the nodes associated with the menu term. For example, I click on 'Buildings' and it goes to a page with teasers of all nodes associated with 'Buildings'.

How could I have the menu term link to the latest node associated with that term directly? To continue the example, I click on 'Buildings' and it takes me to the latest 'Buildings' node.

The list of teasers is unnecessary as I will be employing elements of the teasers in an aside on each node directly.

1 Answer 1

1

I figured it out; here's the solution in case anyone else needs this functionality.

Forget the Taxonomy Menu module. We'll build the functionality with a view.

  1. Make a taxonomy term view (under Show when creating a view).
  2. Under Advanced, add this Relationship: Taxonomy Term - Representative Node. You can leave all the settings the same, but I suggest checking 'Require this relationship' so empty terms will not get linked
  3. Also Under Advanced, change Use aggregation to Yes
  4. Add a filter for Taxonomy Vocabulary (with whatever vocab you want)
  5. Add a Content:Path field, exclude it from display and check 'Use absolute link'
  6. Add a Taxonomy Term:Name field and check Output this field as a link. For the Link Path use the Path Replacement Pattern from the Path field we just added (usually [path]).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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