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.

Comments

newdru’s picture

this looks like a good patch. anybody moving on this?

also. does the normal taxonomy module provide this same kind of caching for terms?

thanks

miiimooo’s picture

thanks and no

newdru’s picture

no that nobody is moving on this or no in the sense that the standard taxonomy module doesn't cache?

miiimooo’s picture

I 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.

newdru’s picture

i wonder why the base module doesn't cache. it seems like it would benefit greatly from this.

agileware’s picture

Status: Needs review » Fixed

Thanks 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.