nowinz Posted June 6, 2022 Share Posted June 6, 2022 Hi Community Example {if $templatefile == 'account-contacts-new'} blala {/if} More than one ? {if $templatefile == 'account-contacts-new, homepage etc...............'} blala {/if} thanks 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted June 7, 2022 Share Posted June 7, 2022 Yes, use "OR" 🙂 for example {if $variable eq "specific-thing" || $variable|strstr:"other" || $variable eq "just-one-more"}Do Something{/if} 0 Quote Link to comment Share on other sites More sharing options...
nowinz Posted June 7, 2022 Author Share Posted June 7, 2022 Hi, thanks for reply, this is not working for me {if $templatefile eq "login" || $templatefile|strstr:"linkedaccounts" || $templatefile eq "just-one-more"} <div class="sub-head"> <div class="custom-width"> <div class="row"> <h2>{$companyname} - {$pagetitle}{if $kbarticle.title} - {$kbarticle.title}{/if}</h2> <p>{$breadcrumbnav}</p> <p></p> </div> </div> </div> {if $loggedin} <nav id="nav" class="navbar navbar-default navbar-main" role="navigation"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-nav"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="primary-nav"> <ul class="nav navbar-nav"> </ul> <ul class="nav navbar-nav navbar-left"> {include file="$template/includes/navbar.tpl" navbar=$primaryNavbar} </ul> </div><!-- /.navbar-collapse --> </div> </nav> {/if} {/if} 0 Quote Link to comment Share on other sites More sharing options...
nowinz Posted June 7, 2022 Author Share Posted June 7, 2022 sorry my fail is working big thanks 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted June 7, 2022 Share Posted June 7, 2022 (edited) On 6/6/2022 at 7:25 PM, nowinz said: Hi Community Example {if $templatefile == 'account-contacts-new'} blala {/if} More than one ? {if $templatefile == 'account-contacts-new, homepage etc...............'} blala {/if} thanks {if $templatefile|in_array:['account-contacts-new','homepage']} for equal and $templatefile|strstr:”linkedaccounts” as @othellotech said for search. Edited June 7, 2022 by pRieStaKos 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.