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

assigning forms 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
Gregg
Smarty Rookie


Joined: 07 Jul 2003
Posts: 6

PostPosted: Fri Jul 11, 2003 2:56 am    Post subject: assigning forms in smarty Reply with quote

I was wondering if it was bad or good or indifferent practice to assign html forms to smarty objects. Something like:

$user_name_form = "<input type='text' name='username'>";
$smarty->assign('usernameform', $user_name_form);

My initial thinking was try and keep ALL html in the tpl file and none in the php file. But I don't see anything wrong with doing this. I was just curious what the norm was.

Thanks
Gregg
Back to top
View user's profile Send private message Visit poster's website
Enquest
Smarty Regular


Joined: 14 May 2003
Posts: 79

PostPosted: Fri Jul 11, 2003 10:42 am    Post subject: Reply with quote

I think (not expert) that it slows thing a little bit down. Afteral you need to assign extra's. But what would you like to acomplise by doing this?
I think it could give you a lot more work!
_________________
-----------------------
Learning my self by trying to help others
Back to top
View user's profile Send private message
Gregg
Smarty Rookie


Joined: 07 Jul 2003
Posts: 6

PostPosted: Fri Jul 11, 2003 2:09 pm    Post subject: Reply with quote

My initial thought was to keep the tpl file as clean as possible. But I agree that it may slow things down a bit. And, in order to keep designers out of the php file, the html would need to be in the tpl file.

Thanks.
Back to top
View user's profile Send private message Visit poster's website
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