nodewords hook (easy entry point for token support in 1.x branch)
| Project: | Meta tags |
| Version: | 5.x-1.8 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
This issue is somehow related to a few already entered here and some postponed. (#214206: Token Integration, #232208: Meta Tags on a content type basis + tokens?).
I also needed some kind of token replacement and instead of heavily patching the module I am suggesting this approach which might be good to port to 2.x branch as well, and that is, having a nodewords hook that modules might implement to do further processing on the tags. I read that the new branch will have token support so this may stay in 1.x branch but it's ready to be used now.
The patch is just a new _nodewords_invoke() function that is very much the same that node.module uses for nodeapi. And I added a 'prepare' operation for the hook just before preparing tags by the included functions. In this way modules can process tags before they are passed to the actual nodewords tags.
I probably soon commit a module called nodewords_token which will use this hook and will add the ability to have global descriptions per content type using tokens.
I believe this is a very light patch plus very powerful for us module developers so we can contrib to this module without heavy patching.
Looking forward to hearing community and developers comments.
Ariel.=
| Attachment | Size |
|---|---|
| nodewords.module.patch | 1.4 KB |

#1
#2
#3
Here is the support module I built with this patch: Meta Tags Node Type
#4
+1 this feature. I LOVE the hook. Very, very useful for customized meta tags requests.
#5
I'd also like to add that one of my coworkers will be building a module that implements the hook defined by this patch. The module will allow custom meta data by path, which would effectively allow any non-node page to display custom data.
#6
Meta tags by path requires this patch. It allows the value of meta tags to be controlled on a per path basis.
#7
Committed. Will be included in 5.x-1.9. Thanks a lot! Also for the two wonderful modules!
#8
Automatically closed -- issue fixed for two weeks with no activity.