|
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 |
griddy Smarty n00b
Joined: 22 Jul 2003 Posts: 2
|
Posted: Tue Jul 22, 2003 4:00 am Post subject: register_function return values? |
|
|
Is it possible to register a function that returns true/false and use that function in an {if} block?
For instance:
Code: |
function returnTrue($this = true) {
return $this;
}
$smarty->register_function("returnTrue","returnTrue");
...
{if not returnTrue(false)}
I'm true.
{/if}
|
|
|
Back to top |
|
griddy Smarty n00b
Joined: 22 Jul 2003 Posts: 2
|
Posted: Tue Jul 22, 2003 4:07 am Post subject: |
|
|
Nevermind It works fine. I mistyped a variable. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
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
|