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

using php class in smarty?

 
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 -> General
View previous topic :: View next topic  
Author Message
brainwave
Smarty Rookie


Joined: 09 Jul 2003
Posts: 22

PostPosted: Mon Sep 08, 2003 2:58 pm    Post subject: using php class in smarty? Reply with quote

Hi,

can I do something like this in smarty tpl files?

Code:

{if $auth->is_admin()}
               <div align="center" valign="bottom"><a href="admin.php" class="font-small" style="color:{#font6#};">Administration</a></div>
            {/if}


Greetings
Sascha
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon Sep 08, 2003 3:56 pm    Post subject: Reply with quote

Yes, since at least 2.5.0. You can assign objects [it may be better to acutually use assign_by_ref() for objects] to template variables or you can register them using the new API functions.
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 -> General 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