Closed (fixed)
Project:
Taxonomy Redirect
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2008 at 12:06 UTC
Updated:
8 Oct 2008 at 00:12 UTC
Hi
I needed this slightly changed so I could set the taxonomy term path according to the current "section" of the site. E.g. I wanted it to be different for /about/ and for /contact/.
Sorry, patch got quite lengthy.
Just to give an example for a code snippet for the term path:
$s = explode('/',request_uri());
if($s[1]) {
echo $s[1].'/tags/!name';
return;
}
echo 'all/tags/!name';
There's also a bit of caching code now to reduce the number of database queries. It does that by storing the path for each vocabulary after the first call inside the request.
| Comment | File | Size | Author |
|---|---|---|---|
| taxonomy_redirect-PHP-code-and-caching.patch | 10.29 KB | miiimooo |
Comments
Comment #1
newdru commentedthis looks like a good patch. anybody moving on this?
also. does the normal taxonomy module provide this same kind of caching for terms?
thanks
Comment #2
miiimooothanks and no
Comment #3
newdru commentedno that nobody is moving on this or no in the sense that the standard taxonomy module doesn't cache?
Comment #4
miiimoooI don't know about the moving ;)
The standard module doesn't cache. It would be possible to add that though. It also would be quite easy tom make this configurable by vocabulary.
Comment #5
newdru commentedi wonder why the base module doesn't cache. it seems like it would benefit greatly from this.
Comment #6
agileware commentedThanks for the patch.
5.x-1.2 now has the ability to add PHP code to make the path.
This will also be added to the Drupal 6 version asap.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.