Page 1 of 1

[SOLVED] Conditional statement gives Smarty error

Posted: Mon Aug 13, 2007 8:00 am
by halm
I've tried to put an {if}{else} statement in  my template to have alternate content in my "blog" page.
Something is amiss, though, because I get this error:

Code: Select all

string(116) "Smarty error: [in template:24 [color=red]line 108[/color]]: syntax error: unidentified token '=' (Smarty_Compiler.class.php, line 1407)"
Starting on line 108 of the template, my {if}{else} script goes like this:

Code: Select all

   {if $page_alias='blog'}
         <p>
              <h4>Categories</h4></br>
              {cms_module module='News'  browsecat="1" summarytemplate='categorylist.tpl' number='20'}
         </p>
         {cms_module module='News' makerssbutton='true' number='10'}
         <p>
              {cms_module module="bookmarks" category="Blogroll" target="_blank"}
         </p>
   {else}
         {news number='5' detailpage="blog" moretext="read on -"}
         {cms_module module='News' makerssbutton='true' number='10'}
   {/if}
Thx!

Re: Conditional statement gives Smarty error

Posted: Mon Aug 13, 2007 8:50 am
by cyberman
Have you tried this?

Code: Select all

{if $page_alias eq 'blog'}

Re: Conditional statement gives Smarty error

Posted: Mon Aug 13, 2007 9:09 am
by halm
Didn't know that one. That sorted it out, thank you Locutus!