Not sure if you're interested in this, because essentially it is a full rewrite of your module, but the attached patch changes the module to use hook_link_alter instead of hook_init.

Using hook_link_alter, the links to taxonomy term pages are altered before they are rendered to the html. Advantages include:

  • If you have url aliases set to the 'taxonomy/[tid]/all' links, the url alias is rendered instead of 'taxonomy/[tid]'
  • Results of 'forcing' the links are cached, instead of executing hook_init on every page call even if the page is not a taxonomy term page.
  • The 'non-all' pages are still available upon request
  • It's an even smaller module like this ;-)
CommentFileSizeAuthor
#1 taxonomy_forceall_link_alter.patch1.09 KBahoeben

Comments

ahoeben’s picture

StatusFileSize
new1.09 KB

forgot the patch...

aymerick’s picture

Assigned: Unassigned » aymerick
Status: Needs review » Closed (fixed)

Thanks for this patch.

I have added a new setting to choose between the hook_init() method (the default one) and your hook_link_alter() method.

The upcoming 5.x-1.1 version will have this new feature.

polmaresma’s picture

Thank's for the module!
Is it possible to work with a views exposed filter?

thank's