[SOLVED] Conditional statement gives Smarty error

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
halm
Forum Members
Forum Members
Posts: 103
Joined: Mon Jun 11, 2007 12:52 pm

[SOLVED] Conditional statement gives Smarty error

Post 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!
Last edited by halm on Mon Aug 13, 2007 9:10 am, edited 1 time in total.
"One measures a circle, beginning anywhere" - Charles Fort
cyberman

Re: Conditional statement gives Smarty error

Post by cyberman »

Have you tried this?

Code: Select all

{if $page_alias eq 'blog'}
halm
Forum Members
Forum Members
Posts: 103
Joined: Mon Jun 11, 2007 12:52 pm

Re: Conditional statement gives Smarty error

Post by halm »

Didn't know that one. That sorted it out, thank you Locutus!
"One measures a circle, beginning anywhere" - Charles Fort
Post Reply

Return to “CMSMS Core”