By James Harvard on
Experimenting with the Views module I set up a view for /taxonomy/term with 1 argument of 'term id'. This appeared to overwrite the default output of /taxonomy/term/n (i.e. I saw my new view page, and not the usual /taxonomy/term/n page).
Is this intended (and thus stable) behaviour, or just accidental? In other words, is it something I could use in a site, or might a future version of Views or Drupal change something so that the taxonomy.module implementation of /taxonomy/term/n would take precedence over my views.module implementation?
Thanks, James Harvard
Comments
I am sure an expert will
I am sure an expert will come along and give a better explanation, but I am pretty sure this is the intented function.
The views module was written to display custom ways of viewing content, at the paths set in the module. They are intented to supercede the default way of displaying items (like the normal taxonomy displays).
I am sure hoping this behavior is not depreciated in the future as I am designing my site on the stability of the views module rendering such paths.
-Gman
From the horse's mouth
Forgot to mention that the
admin/viewspage says something about overriding system views:However after reading that it still wasn't 100% clear to me that views.module is designed to override any system view with the same path, or just the ones listed on the Views admin page.
Hmmm
Am I crazy here? I also setup a view with a URL "taxonomy/term". When I hit /taxonomy/term/n I still get the default taxonomy view provided by the system rather than my custom view.
ANyone have any thoughts to point me in the right direction?
Maybe a caching issue? Try
Maybe a caching issue? Try accessing the page as a different user (IIRC caching is done 'per user').
Fixed
merlinofchaos responded to an email offline:
I made the change and it worked. Not sure why this isn't the default case when the module installs though.
view for specific vocabulary
When I create a new taxonomy/term view it overrides views for all vocabularies but I need it only for one and keep the default view for the rest. Anyone knows how to restrict this view to a specific vocabulary?
Taxonomy_redirect
Hi,
Could the taxonomy_redirect module help you?
greetings,
Martijn
I have the same problem but
I have the same problem but found the solution. Due to the issue mentioned here http://drupal.org/node/124847 I can fix the problem by changing 'taxonomy/term/' to taxonomy_term_path($term) in the source code of the module that incorrectly show redirected link. The problem is not in the taxonomy redirect module.
For example I needed to change all taxonomy term link in a vocabulary from taxonomy/term/TERMID to faq/TERMID and Display all term in that vocabulary by using taxonomy list. I went to taxonomy_list.module and changed line 266 which has hard code 'taxonomy/term' . $term->tid so you can see that it will never change to what I want (faq/TERMID). If you want to make it call to hook method defined in taxonomy_redirect.module, then you have to change it to taxonomy_term_path($term).
Hi, I've this issue for you
Hi, I've this issue for you folks: I'm doing a Flickr-like site using Drupal 5.3. I've installed these modules: Views, CCK, Imagefield for CCK, Imagecache, Pathauto and Token.
Well, after I made new content type (photo entry) with CCK + Imagefield (using imagecache, too), I've done a new vocabulary for photo's tags, then I've assigned new url alias with pathauto and token like this:
Then I've made a new View for viewing all photos linked to a specific tag using the path photo/tags/#name-of-tag. This is the export of that view:
Well, if I go to photo/tags/#name-of-a-tag Drupal returnes to me the taxonomy page list instead of the view I've made.
Is there a way to override taxonomy path with custom view path?