Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Custom <body> id depending on the current template

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
ZagorsKey
Smarty n00b


Joined: 02 Feb 2011
Posts: 2
Location: Bulgaria

PostPosted: Fri Feb 25, 2011 3:09 pm    Post subject: Custom <body> id depending on the current template Reply with quote

We've seen various practices of giving the body tag a dynamic id in different CMSes and etc.
Thanks to the Smarty's reserved functions, making a dynamic id depending on the current template in Smarty is as simple as that:
Code:
<body id='{$smarty.get.page}'>


Try it for yourself. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP