Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Code inco.

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Enquest
Smarty Regular


Joined: 14 May 2003
Posts: 79

PostPosted: Tue Jun 10, 2003 12:07 pm    Post subject: Code inco. Reply with quote

Shouldn't the following code not be. (this won't work)
Code:
{html_select_date end_year="+3" time="$action.begindate" field_order="DMY"}


instead of (this wil)
Code:
{html_select_date end_year="+3" time=$action.begindate field_order="DMY"}


Notice the ' " ' around the $action.begindate.

Just wondering...
_________________
-----------------------
Learning my self by trying to help others
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Tue Jun 10, 2003 2:38 pm    Post subject: Reply with quote

The first one doesn't work because $action.begindate is not properly parsed inside double quotes, it only sees $action as the variable. You could do this too:

{html_select_date end_year="+3" time="`$action.begindate`" field_order="DMY"}

But your second example is cleaner.

Monte
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development 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