Running 4.7 and latest version of Views.
Bascially, I am using (or trying to use) views to theme my taxonomy pages. The problem that I'm running into is really simple, but I just can't quite work it out. Here's the setup. Let's say I have
flowers (/taxonomy/term/1 aliased as /flowers)
red flowers (/taxonomy/term/2 aliased as /flowers/red)
yellow flowers (/taxonomy/term/3 aliased as /flowers/yellow)
blue flowers (/taxonomy/term/4 aliased as /flowers/blue)
I want to set it up so that when someone goes to /flowers they get four tabs
All | Red | Yellow | Blue
When I use views, I do not seem to be able to get views to work when I use the url aliases, so I am using the taxonomy terms. Thus
taxonomy/term/2 is the declared URL for the flowers_red view
flowers/red is the URL for the actual page as accessed via the URL alias
So I'm trying to figure out how to get tabs on my views using the /flowers/* URLs
By the way, I know I could use a new URL like /view/flowers/all and /view/flowers/red but that has two problems
1. This is an existing site
2. It breaks navigation by taxonomy terms that are included in the post.
Thanks!
Comments
Incidentally, it works
Incidentally, it works exactly as I wish if I just change the URL in the views declarations to
testword/1
testword/2
testword/3
So I know that it's almost there, I just can't figure out how to work with an existing URL alias.
I suppose I could just undo the aliases that point to taxonomy terms and then use mod_rewrite to rewrite all of my taxonomy term URLs as in
RewriteRule ^taxonomy/term/1(.*) flowers/all [L]
but that seems like a hassle (new rule for every taxonomy term that has a view) and sort of a bad idea.
Yosemite Explorer - hiking and climbing in Yosemite (drupal)
Another idea
You could also try Taxonomy Redirect if you have taxonomy/term/# paths that you need to redirect to views.
--
Cheap, reliable Drupal hosting: 20GB | 1TB
Save $75| DH75OFF coupon for 1 year ($3.75/mo!)
Save $50| DH02SETUP coupon for monthly ($10/mo!)
Do you need to use aliases?
Could you create a view, rendered as a page and a tab, that filters on the taxonomy term instead of using URL aliases?
View 1
Filter: Red
Menu: As tab
Page: Checked
Path: flowers/red
View 2
Filter: Yellow
Menu: As tab
Page: Checked
Path: flowers/yellow
etc.
View 4
Filter: Flowers
Menu: As tab + default tab
Page: Checked
Path: flowers/all [+ flowers because it is default]
--
Cheap, reliable Drupal hosting: 20GB | 1TB
Save $75| DH75OFF coupon for 1 year ($3.75/mo!)
Save $50| DH02SETUP coupon for monthly ($10/mo!)
I've been offline for a few
I've been offline for a few days...
I am filtering on taxonomy and I get what I want with respect to a given URL pointing to the view. Where it breaks down is that when a taxonomy term is autolinked such as the "Post installation · Drupal 4.7.x" tags in this thread. They link to taxonomy/term/22 and taxonomy/term/47 respectively and what I can't get is for the custom URL (whether an alias or a view name) to be set up such that it aliases the taxonomy (so instead of "taxonomy/term/22" it would be "post-install") and points from there to the view.
I think your suggestion of texonomy redirect is what I need. I'll try it and report back.
Thanks
Yosemite Explorer - hiking and climbing in Yosemite (drupal)
Taxonomy Redirect not quite there
According to the module page:
That makes it sound like something inherent to the taxonomy system makes what I want to do impossible from within drupal. I may be able to do it with mod_rewrite, but it doesn't seem like this should be that hard....
The root problem is really the tabs. If I give those up, then I can just name the views to override the taxonomy and then alias the taxonomy terms, but the views module will not tab on /taxonomy/term/TID (rightly so).
Yosemite Explorer - hiking and climbing in Yosemite (drupal)
Manual Tabs
I think I'll just have to creat manual tabs in the Views header and just manage it manually. I can't seem to get it to work any other way.
Yosemite Explorer - hiking and climbing in Yosemite (drupal)
same issue in Drupal5.1
Anybody fix this issue?
Richard Ma
www.meetcampus.com