Question

my whmcs title code show beleow. i want to modified it.

<title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title>

i want when i go my site homepage/index page then show this code like that

<title>{$companyname} - {$pagetitle}</title>

but when i go other page like shared hosting,reseller hosting etc then code show that

<title>{$pagetitle} - {$companyname}</title>

how i can do it. it possible?

Was it helpful?

Solution

You Should Some Modified Mr Caner G code. like this. i think it will be work.

<title>{if $filename eq "index"}{$companyname} - {$pagetitle}
{else}{$pagetitle} - {$companyname}{/if}</title>

OTHER TIPS

In your templates, find header.tpl, use the following code :

{if $filename eq "index"}
<title>{$companyname} - {$pagetitle}</title>
{else}
<title>{$pagetitle} - {$companyname}</title>
{/if}

Yes it is possible. Please check the following offical document of WHMCS(Page titles section) : http://docs.whmcs.com/Seo

Alternatively you could use the template var {$isIndex}.

Like so

<title>
 {if $isIndex} 
  {$companyname} - {$pagetitle}
 {else} 
  {$pagetitle} - {$companyname} 
 {/if} 
</title> 

When in doubt about what template vars are available to you in WHMCS you can always use the {debug} command

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top