制作Whmcs主题|Whmcs模板常用函数变量

折腾whmcs主题 模板的时候经常用的到函数变量!

{$companyname} //网站名称
{$WEB_ROOT} //网址根目录
{$headoutput}   //</head>信息输出
{$headeroutput}  //头部输出<body>后面
{$footeroutput}  //底部输出</body>前面
{$date_year} //系统日期年

//加载模板
{include file="$template/xxx.tpl"}
<title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title>

//不是这样页面和模板
!$showingLoginPage && !$inShoppingCart && $templatefile != 'homepage' 

//检测系统语言,并输出系统可选择语言
{if $languagechangeenabled && count($locales) > 1}                
{$activeLocale.localisedName} //当前语言                                       
{foreach $locales as $locale} //循环检测
{$currentpagelinkback}language={$locale.language}  //系统语言链接
{$locale.localisedName} //语言名字
{/foreach}
{/if}
            
{if $loggedin}{/if}  //如果已经登录
{if $templatefile == 'homepage'}{/if}   //检查模板用的是homepage.tpl
{if $registerdomainenabled || $transferdomainenabled}{/if} 检测有开放域名注册和转移功能
{if count($clientAlerts) > 0}{/if}//检测账户通知信息大于0
{foreach $clientAlerts as $alert}
{if $alert->getSeverity() == 'danger'}exclamation-circle
{elseif $alert->getSeverity() == 'warning'}warning
{elseif $alert->getSeverity() == 'info'}info-circle
{else}check-circle{/if} //判断信息类别输出不同格式
{$alert->getMessage()} //消息输出
{foreachelse} //没有消息
{$LANG.notificationsnone}  
{/foreach}
logout.php //退出

//判断管理员并已经登录了输出
{if $adminMasqueradingAsClient || $adminLoggedIn}
{/if}
  
//判断如果有logo输出LOGO,没有就网站名
 {if $assetLogoPath}           
<a href="{$WEB_ROOT}/index.php" class="logo"><img src="{$assetLogoPath}" alt="{$companyname}"></a>       
{else}           
<a href="{$WEB_ROOT}/index.php" class="logo logo-text">{$companyname}</a>        
{/if}

原创文章,作者:赛福,如若转载,请注明出处:https://www.safecdn.cn/1624.html

本站不销售、不代购、不提供任何支持,仅分享网络信息,请自行辨别,请遵纪守法、文明上网。