I've been searching for hours now, but can't find the solution for this simple issue. Searched all forums, but no luck...
All I want to do is build this inside a template:
{$myname = 'bob'}
{if $myname == 'bob'} Hello I'm Bob! {else} I am not Bob {/if}
It's as simple as that, and still it's the most difficult issue in CMSMS I have ever faced. (after 2 hours of trying, I'm starting to wonder if it's even possible).
Someone please help.
Cheers,
Jeroen
if/else statements seem impossible
-
- Forum Members
- Posts: 23
- Joined: Mon Dec 03, 2007 9:32 pm
Re: if/else statements seem impossible
Try:
{assign var=myname value='bob'}
Nullig
{assign var=myname value='bob'}
Nullig
-
- Forum Members
- Posts: 23
- Joined: Mon Dec 03, 2007 9:32 pm
Re: if/else statements seem impossible
You're a hero!
Works like a charm! Thanks a bunch.
(They should put this somewhere in the manual though)
Works like a charm! Thanks a bunch.
(They should put this somewhere in the manual though)
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: if/else statements seem impossible
It is... You just didn't read it:weaselweasel wrote: (They should put this somewhere in the manual though)
http://smarty.net/manual/en/
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- Forum Members
- Posts: 23
- Joined: Mon Dec 03, 2007 9:32 pm
Re: if/else statements seem impossible
Aha, that link comes in very handy. Thanks again.calguy1000 wrote:It is... You just didn't read it:weaselweasel wrote: (They should put this somewhere in the manual though)
http://smarty.net/manual/en/