Refactor to use hook_link_alter
ahoeben - March 21, 2007 - 10:09
| Project: | Taxonomy Force All |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | aymerick |
| Status: | closed |
Description
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 ;-)

#1
forgot the patch...
#2
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.
#3
Thank's for the module!
Is it possible to work with a views exposed filter?
thank's