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 ;-)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | taxonomy_forceall_link_alter.patch | 1.09 KB | ahoeben |
Comments
Comment #1
ahoeben commentedforgot the patch...
Comment #2
aymerick commentedThanks 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.
Comment #3
polmaresma commentedThank's for the module!
Is it possible to work with a views exposed filter?
thank's