I've a lot of complicated content types with hundred of nodes for each. For ease of adding data I decided to split the content types into several content types, then combined them in tabbed Views using taxonomy terms as arguments. This works great but the Views has to a have a different url and the Drupal search only shows the content type node, and not the View... and it is not possible to insert the tabbed View into the content type (or at least I didn't manage it), so I want to be able to redirect users from ../content/taxonomy_term (the url of the node) to ../content/display/taxonomy_term (the url of the tabbed view). Is there a way to do this? Where the code picks up part of the url and adds it to the redirect url so it can be used as an argument? Manually adding the redirects for each node as it is created is too big a job.
Comments
Comment #1
QuangVan commentedEdited...
I figured out a way to do this, if you are trying to do the same things I was...
taxonomy/term/1 ---> view/list/1 (My views page, with dynamic arguments)
So my views page argument set up was view/list/% -> Then it filters by the term.
At first I was trying to use the "Path Redirect" module, but realized you couldn't add arguments to the path, so you couldn't use '%' or '$1' to define arguments. So I thought you had to add it all by hand.
But then I realized Views gives you the capabilities to add dynamic urls. They actually have a default view you could edit called "taxonomy_term" that you can edit and create a custom view...
So now if someone goes to 'taxonomy/term/1' it'll display the node with your custom view settings instead of the default.
Wonderful, simply use 'taxonomy/term/%' for your View path, and the arguments will take care of themselves, so it's not really a redirect, but views overwrites the default handling of the term's nodes page...
Hope this helps,
-Quang
I'd emailed the original poster, thought it'd be beneficial to include it here:
Comment #2
dave reidQuangVan: I'm glad you found a solution that worked for you. I'm also marking this as a duplicate of #182512: Add Wildcards to Redirect Paths.