gbensonii Posted December 6, 2011 Share Posted December 6, 2011 I am looking for a way to customize my header.tpl file so that if a given option is not enabled then it doesn't show up in the menu option. For instance - I do not currently allow credit card info to be stored and so I want the template to be able to check to see if credit cards are allowed and if so display the menu option but if not then to not display that menu option. Below is a part of the code I am using: {if $loggedin} <ul class="art-hmenu"> <li><a href="{if $loggedin}clientarea{else}index{/if}.php">{$LANG.account}</a> <ul> <li><a href="affiliates.php">{$LANG.affiliatestitle}</a></li> <li><a href="clientarea.php?action=details">{$LANG.editaccountdetails}</a></li> <li><a href="clientarea.php?action=creditcard">{$LANG.navmanagecc}</a></li> <li><a href="clientarea.php?action=contacts">{$LANG.clientareanavcontacts}</a></li> <li><a href="clientarea.php?action=addfunds">{$LANG.addfunds}</a></li> <li><a href="clientarea.php?action=emails">{$LANG.navemailssent}</a></li> <li><a href="clientarea.php?action=changepw">{$LANG.clientareanavchangepw}</a></li> <li><a href="logout.php">{$LANG.logouttitle}</a></li> </ul> </li> <li><a href="#" class="menu">{$LANG.navbilling}</a> <ul> <li><a href="clientarea.php?action=invoices">{$LANG.invoices}</a></li> <li><a href="clientarea.php?action=quotes">{$LANG.quotestitle}</a></li> </ul> </li> <li><a href="#" class="menu">{$LANG.navdomains}</a> <ul> <li><a href="clientarea.php?action=domains">{$LANG.clientareanavdomains}</a></li> <li class="divider"></li> <li><a href="cart.php?gid=renewals">{$LANG.navrenewdomains}</a></li> <li><a href="cart.php?a=add&domain=register">{$LANG.navregisterdomain}</a></li> <li><a href="cart.php?a=add&domain=transfer">{$LANG.navtransferdomain}</a></li> <li class="divider"></li> <li><a href="domainchecker.php">{$LANG.navwhoislookup}</a></li> </ul> </li> <li><a href="#" class="menu">{$LANG.navservices}</a> <ul> <li><a href="clientarea.php?action=products">{$LANG.clientareanavservices}</a></li> <li class="divider"></li> <li><a href="cart.php">{$LANG.navservicesorder}</a></li> <li><a href="cart.php?gid=addons">{$LANG.clientareaviewaddons}</a></li> </ul> </li> <li> <a href="support.php">{$LANG.navsupport}</a> <ul> <li><a href="downloads.php">{$LANG.downloadstitle}</a></li> <li><a href="knowledgebase.php">{$LANG.knowledgebasetitle}</a></li> <li><a href="serverstatus.php">{$LANG.networkstatustitle}</a></li> <li><a href="supporttickets.php">{$LANG.navtickets}</a> <ul> <li><a href="submitticket.php">{$LANG.navopenticket}</a></li> </ul> </li> </ul> </li> </ul> {else} So the real question I have is this - What, if any, IF / ELSE statement could be used to hide the <li><a href="clientarea.php?action=creditcard">{$LANG.navmanagecc}</a></li> when not enabled? 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted December 6, 2011 Share Posted December 6, 2011 not sure if this would help but in the template clientareadetailslinks.tpl it uses this to determine if a client can edit cc details [b]{if $condlinks.updatecc}[/b] | [b]{if $clientareaaction eq "creditcard"}[/b]<strong>{$LANG.clientareanavchangecc}</strong>{else}<a href="{$smarty.server.PHP_SELF}?action=creditcard">{$LANG.clientareanavchangecc}</a>[b]{/if}{/if}[/b] and in v4 it used the following (it should still work?) [b]{if $ccenabled}[/b] | <a href="{$smarty.server.PHP_SELF}?action=creditcard">{$LANG.clientareanavchangecc}</a>[b]{/if}[/b] 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.