|
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 |
datenpunk Smarty Rookie
Joined: 17 May 2003 Posts: 6
|
Posted: Sun Jul 06, 2003 11:16 pm Post subject: Strange scope problem |
|
|
I have a template which contains some custom functions.
Now I parse the content:
Code: |
<{eval var=$content|nl2br}>
|
Within a function inside this parsed content there is a
Code: |
$smarty->assign('myflag', true);
|
Ok - now comes the strange part:
The function works on a copy of $smarty but I use the referenced &$smarty Object to set myflag.
If I now want to output myflag inside the same column wher the content is located I get nothing back.
BUT for the next column it works:
Simplyfied example:
Code: |
<table>
<tr>
<td>
<{eval var=$content|nl2br}>
<{$myflag}>
</td>
<td>
<{$myflag}>
</td>
</tr>
</table>
|
Basically I don't understand the scope smarty has I think.
Thanks in advance
Daniel Khan |
|
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
|