[development] print token in theme layer

Pooya pooya.source at gmail.com
Wed May 25 01:09:14 UTC 2011

Thank u :) I want to have "node submit time" the exact way I want, so I
checked out tokens available in devel(when viewing story node type) and
found out there are already enough details I need in tokens(like small day,
long day name,...). All I want is to <span> some of these tokens the way I
want in template, I'm gonna check out this token_replace() to see what I can
do with. maybe finish the job in preprocess and then use it in

Never done this before, not sure if it's even possible to use tokens passed
to node.

If I'm missing sth or there's anything u can help me with share, It's a lot
time saver at this point. Thanks for your time :)

On Wed, May 25, 2011 at 5:10 AM, Michael Favia <michael.favia at gmail.com>wrote:

> 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

Pooya Sanooei
Twitter <http://twitter.com/sourcesoft> -
Website <http://www.javabgoo.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110525/5b42283c/attachment.html 

More information about the development mailing list