[development] General token parser (API), does it exist?

Jeff Eaton jeff at viapositiva.net
Wed Dec 6 15:35:32 UTC 2006


Ber,

I also had to rewrite this functionality a few weeks ago for the 
custom_breadcrumb and custom_links modules. I know that pathauto also 
dedicates a good chunk of code to it. The substitution code itself isn't 
hard at all -- it's the central registry of tokens that everyone needs 
to be able to share.

The global ones -- the name of the current user, the name of the site, 
an so on -- are pretty easy. Do you think it woudl be worthwhile to 
centralize more complex ones, like 'variations on the creation date of 
the passed-in node,' and 'the uid of the author of the node', etc?

These kinds of tokens are very useful for constructing paths, among 
other things...

--Jeff


More information about the development mailing list