Contents

In the WHMCS Template files you can actually set content/code to display/load on pages of your choice. This is especially useful for the header.tpl and footer.tpl files as the same files are loaded for most of the pages (with the exception of viewinvoice.tpl).

A single page

{if $filename eq "company"}
	
	show content on company.php
	
{/if}

A single page with fallback (else)

{if $filename eq "company"}
	
	show content on company.php
	
	{else}
	
	show content on all other pages
	
{/if}

The same content/code on a selection of pages

{if $filename eq "company" or $filename eq "web-hosting" or $filename eq "index"}
	
	show content on company.php, web-hosting.php & index.php
	
{/if}

Different content/code on a selection of pages

{if $filename "index"}
	
	show content on index.php
	
	{elseif $filename eq "web-hosting.php"}
	
	show content on web-hosting.php
	
	{elseif $filename eq "company"}
	
	show content on company.php
	
	{else}
	
	show content on all other pages (or remove this line of text for no display)
	
{/if}

Comments

If you have any questions please leave a comment below or contact our support.