Closed (fixed)
Project:
Entity Path
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2011 at 14:57 UTC
Updated:
22 Oct 2012 at 12:01 UTC
In another issue it says:
@Dave Reid - this module overwrites any link to an entity (eg taxonomy/term/%) to take you to a different system path (eg my-custom-view/with-an-arg/%).
I have eg a vocabulary: "category" with the terms: tid:1, chairs, tid:2, dining chairs and tid:3, tables
How to redirect the chairs term page (taxonomy/term/1) to the view chairs_display with the argument "chairs" and
How to redirect the dining chairs term page (taxonomy/term/2) to the view chairs_display with the argument "dining chairs" and
How to redirect the tables term page (taxonomy/term/3) to the view tables_display.
Is this scenario possible with this module?
If it is, what would be the settings?
Thanks
Comments
Comment #1
derhasi commentedIf you can generalize the path for the complete vocabulary, you could use the approach
my-custom-view/with-an-arg/[term:title].If you want to have special path for each term, you should create a field for that, so you can generalize the path to like
my-custom-view/[node:field_term_path_arg].Is your question fixed so?
Comment #2
millionleaves commentedBased on this scenario, I wonder if you're manually creating different Page displays for each term in the vocabulary, hence the need to redirect individual terms to different paths?
If this is what you're trying to do, I would approach the problem differently, and use a single view with an Contextual Filter. That way you could add as many terms to the vocabulary as you want and not have to create displays manually for each term.
In my suggested approach, you'd set the path in the view to something like:
furniture/%You would then use the Entity Path module to to redirect the terms in the Furniture vocabulary to a path such as
furniture/[term:tid]That way, if someone clicks a link to a Furniture term, this module would redirect them to the Path you set in the Page display of the view, and pass in the term ID (tid) as the argument. The view would then display show items tagged with that term.
You can view a useful tutorial on using contextual filters in Views 3/D7 here: http://dev.nodeone.se/en/learn-views-with-nodeone-part-19-contextual-fil....
Comment #3
derhasi commentedIt has been a long time, but thanks millionleaves for your answer.
I assume this issue to be fixed though. Feel free to reopen ;)