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

CommentFileSizeAuthor
nodewords.module.patch1.4 KBhanoii

Comments

hanoii’s picture

Title: nodewords hook » nodewords hook (easy entry point for token in 1.x branch)
hanoii’s picture

Title: nodewords hook (easy entry point for token in 1.x branch) » nodewords hook (easy entry point for token support in 1.x branch)
hanoii’s picture

Here is the support module I built with this patch: Meta Tags Node Type

todd nienkerk’s picture

+1 this feature. I LOVE the hook. Very, very useful for customized meta tags requests.

todd nienkerk’s picture

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.

Anonymous’s picture

Meta tags by path requires this patch. It allows the value of meta tags to be controlled on a per path basis.

Robrecht Jacques’s picture

Status: Needs review » Fixed

Committed. Will be included in 5.x-1.9. Thanks a lot! Also for the two wonderful modules!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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