3245 Posted April 24, 2014 Share Posted April 24, 2014 Hello i want have tow css when loading website, but when i want add below code in header.tpl , i cant see any difference: {if $language eq 'Farsi'}<link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" /> {else} <link rel="stylesheet" type="text/css" href="templates/{$template}/style-ltr.css" /> {/if} how i can know what is problem? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 24, 2014 Share Posted April 24, 2014 what do you mean by "i cant see any difference"? do you mean that CSS files not loaded correctly or your template/design unable to read changes depending on your CSS. explain your issue or put your clientarea URL so we can help greetz 0 Quote Link to comment Share on other sites More sharing options...
3245 Posted April 24, 2014 Author Share Posted April 24, 2014 (edited) means when i select persian, i see right to left, and when i select english, i see same right to left, just with english language, dont use css i used in below cod. Edited April 24, 2014 by 3245 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 24, 2014 Share Posted April 24, 2014 I think the $language variable is always lower-case, so your code should probably be... {if $language eq 'farsi'} <link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" /> {else} <link rel="stylesheet" type="text/css" href="templates/{$template}/style-ltr.css" /> {/if} 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 24, 2014 Share Posted April 24, 2014 I think the $language variable is always lower-case yes you may need to use "farsi" instead of "Farsi" 0 Quote Link to comment Share on other sites More sharing options...
3245 Posted April 24, 2014 Author Share Posted April 24, 2014 i tested with lower-case, but still same problem my header code is below: <!DOCTYPE html><html lang="en"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="robots" content="index, follow" /> <meta name="author" content="" /> <meta http-equiv="content-type" content="text/html; charset={$charset}" /> <title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title> {if $systemurl}<base href="{$systemurl}" /> {/if}<script type="text/javascript" src="includes/jscript/jquery.js"></script> {if $livehelpjs}{$livehelpjs} {/if}{$headoutput} <link href="templates/{$template}/css/bootstrap.css" rel="stylesheet"> <link href="templates/{$template}/css/whmcs.css" rel="stylesheet"> <script src="templates/{$template}/js/whmcs.js"></script> {$headoutput} {if $language eq 'farsi'} <link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" /> {else} <link rel="stylesheet" type="text/css" href="templates/{$template}/style-ltr.css" /> {/if} </head> <body> {$headeroutput} <div id="whmcsheader" align="center"> <div class="whmcscontainer"> <div id="whmcstxtlogo"><a href="index.php">{$companyname}</a></div> <div id="whmcsimglogo"><img src="templates/{$template}/img/whmcslogo.png" alt="{$companyname}" /></div> </div> </div> <div class="topbar"> <div class="fill"> <div class="whmcscontainer"> <ul> <li><a href="{if $loggedin}clientarea{else}index{/if}.php">{$LANG.hometitle}</a></li> </ul> {if $loggedin} <ul> <li class="menu"> <a href="#" class="menu">{$LANG.navservices}</a> <ul class="menu-dropdown"> <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="index.php?m=unblockip">{$LANG.unblockip}</a></li> <li><a href="cart.php?gid=addons">{$LANG.clientareaviewaddons}</a></li> </ul> </li> </ul> <ul> <li class="menu"> <a href="#" class="menu">{$LANG.navdomains}</a> <ul class="menu-dropdown"> <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> </ul> <ul> <li class="menu"> <a href="#" class="menu">{$LANG.navbilling}</a> <ul class="menu-dropdown"> <li><a href="clientarea.php?action=invoices">{$LANG.invoices}</a></li> <li><a href="clientarea.php?action=addfunds">{$LANG.addfunds}</a></li> <li><a href="clientarea.php?action=quotes">{$LANG.quotestitle}</a></li> </ul> </li> </ul> <ul> <li class="menu"> <a href="#" class="menu">{$LANG.navsupport}</a> <ul class="menu-dropdown"> <li><a href="supporttickets.php">{$LANG.navtickets}</a></li> <li><a href="knowledgebase.php">{$LANG.knowledgebasetitle}</a></li> <li><a href="downloads.php">{$LANG.downloadstitle}</a></li> <li><a href="serverstatus.php">{$LANG.networkstatustitle}</a></li> </ul> </li> </ul> <ul> <li><a href="submitticket.php">{$LANG.navopenticket}</a></li> </ul> <ul> <li><a href="affiliates.php">{$LANG.affiliatestitle}</a></li> </ul> <ul class="nav secondary-nav"> <li class="menu"> <a href="#" class="menu">{$LANG.hello}, {$loggedinuser.firstname}!</a> <ul class="menu-dropdown"> <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 class="divider"></li> <li><a href="logout.php">{$LANG.logouttitle}</a></li> </ul> </li> </ul> {else} <ul> <li><a href="announcements.php">{$LANG.announcementstitle}</a></li> </ul> <ul> <li><a href="knowledgebase.php">{$LANG.knowledgebasetitle}</a></li> </ul> <ul> <li><a href="serverstatus.php">{$LANG.networkstatustitle}</a></li> </ul> <ul> <li><a href="affiliates.php">{$LANG.affiliatestitle}</a></li> </ul> <ul> <li><a href="contact.php">{$LANG.contactus}</a></li> </ul> <ul class="nav secondary-nav"> <li class="menu"> <a href="#" class="menu">{$LANG.account}</a> <ul class="menu-dropdown"> <li><a href="clientarea.php">{$LANG.login}</a></li> <li><a href="register.php">{$LANG.register}</a></li> <li class="divider"></li> <li><a href="pwreset.php">{$LANG.forgotpw}</a></li> </ul> </li> </ul> {/if} </div> </div> </div> <div class="whmcscontainer"> <div class="contentpadded"> {if $pagetitle eq $LANG.carttitle}<div id="whmcsorderfrm">{/if} Please help me. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 24, 2014 Share Posted April 24, 2014 can you provide your client area URL or PM it to me? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 24, 2014 Share Posted April 24, 2014 sentq is correct - someone will likely need to see your url. I just tried your {if} statement in our header - as we don't have access to your css, I tweaked the code a little... {if $language eq 'farsi'} fred {else} wilma {/if} it does work - says "fred" when farsi is chosen, and "wilma" at other times - though doesn't work when using 'Farsi' with a capital 'F'... another thing to try might be to empty your template cache... -> utilities -> system -> system cleanup -> empty template cache... it might be that your browser is not showing the updated page but using one already in the cache - if that doesn't work, you might try clearing the browser cache too. 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.