Kian Posted July 23, 2010 Share Posted July 23, 2010 Hello Well i can't sort it out. The problem is very simple. I want to show in nav menu 3 different codes. {if $pagetitle eq "Announcements"} {$LANG.globalyouarehere}: TEXT A {if $pagetitle eq "Knowledgebase"} {$LANG.globalyouarehere}: TEXT B {else} {$LANG.globalyouarehere}: TEXT C {/if}{/if} Basically i want to show "TEXT A" if page title is "Announcements", "TEXT B" if page title is "Knowledgebase" and "TEXT C" for all other pages. The problem is that i always get TEXT A & TEXT C or TEXT B & TEXT C. o_O I also tryed with {if $pagetitle eq "Announcements"} {$LANG.globalyouarehere}: TEXT A {/if} {if $pagetitle eq "Knowledgebase"} {$LANG.globalyouarehere}: TEXT B {else} {$LANG.globalyouarehere}: TEXT C {/if} But TEXT C is always present 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted July 23, 2010 Share Posted July 23, 2010 (edited) Here is solution of your problem {if $filename eq "Announcements"} {$LANG.globalyouarehere}: TEXT A {elseif $filename eq "Knowledgebase" } {$LANG.globalyouarehere}: TEXT B {else} {$LANG.globalyouarehere}: TEXT C {/if} you can find more information about smarty if else at : http://www.smarty.net/manual/en/language.function.if.php Edited July 23, 2010 by b.ahmed 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted July 23, 2010 Author Share Posted July 23, 2010 daaaamn ELSEIF! Noob me thank you 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.