|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
sams123 Smarty n00b
Joined: 23 Feb 2010 Posts: 4
|
Posted: Thu Mar 04, 2010 4:36 am Post subject: place {insert} tag on template |
|
|
hi all, i want to ask how if i want to put result of the {insert} tag in template but not in top of page, say i want to put this into middle of the template page ?
Example :
<html>
....
<table>...
{insert name='test'}
...
</html>
function insert_test($param) {
echo "<table width='100%' cellpadding='1' cellspacing='1' class='table_error_code'>" ;
echo "<tr>" ;
echo "<td class='field_error_code'>".GetParam('errorString)."</td>" ;
echo "</tr>" ;
echo "</table>" ;
}
in this case the result of insert will always put in the top of page, whereas i want to put after table in the middle of page.
Help for the answer ASAP ya, thx a lot. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Mar 04, 2010 8:18 pm Post subject: |
|
|
It must be an error in the resulting HMTL output. Smarty does put the out output of the {insert} tag at the corresponding template location. |
|
Back to top |
|
sams123 Smarty n00b
Joined: 23 Feb 2010 Posts: 4
|
Posted: Fri Mar 05, 2010 6:45 am Post subject: |
|
|
ok i have solved this |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Mar 05, 2010 1:32 pm Post subject: |
|
|
make sure the insert tag returns the output, not just echo it. |
|
Back to top |
|
|
|
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
|