Template Code Example

You are currently watching the v2 legacy branch documentation.

Template Code Example


This code is from the default template of WHMCS. You can download pre-set template files here.

File: clientareadomaindetails.tpl.

Menu code:

{if $dnsmanagement}<li><a href="?m=solutedns&domainid={$domainid}">{$LANG.clientareadomainmanagedns}</a></li>{/if}

Addon page code:

{if $addonstatus.dnsmanagement}
<a href="?m=solutedns&domainid={$domainid}">Manage</a> | <a href="clientarea.php?action=domainaddons&id={$domainid}&disable=dnsmanagement&token={$token}">Disable</a>
{else}

File: clientareaproductdetails.tpl.

Menu code:

{if $dnsonlymanagement}<li><a href="?m=solutedns&productid={$id}">{$LANG.clientareadomainmanagedns}</a></li>{/if}

Add before (existing code):

{if $packagesupgrade}<li><a href="upgrade.php?type=package&id={$id}">{$LANG.upgradedowngradepackage}</a></li>{/if}