[development] print token in theme layer

Michael Favia michael.favia at gmail.com
Wed May 25 00:40:50 UTC 2011


On 05/24/11 18:08, Pooya wrote:
> Is it possible to print tokens( I can see in Token tab of devel module
> in a node) in theme? like simple echo or something?
> I want to use it in node-story.tpl.php
While you can probably call a token replacement function token_replace()
they are usually reserved for plaintext user input in the UI. You have
direct access to most variables required inside the template or
preprocess function. If you elaborate a little further about your goal
id be happy to help you do this ina more "drupalesque" fashion itll also
give you more power in your regular theming.

-- 
Michael Favia                   michael at favish.com
tel. 512.669.5650            http://www.favish.com



More information about the development mailing list