Jump to content

How to about metatags and other SEO stuff in head


Zorro67

Recommended Posts

reposted from http://forum.whmcs.com/showthread.php?t=5427

 

Given that 3.8.1 now has some SEO capabilities, i thought I would add to its richness with some metawordstags specific to those modified pages.

 

<title>{$companyname} - {$pagetitle}{if $kbcat.name} - {$kbcat.name}{/if}{if $title} - {$title}{/if}{if $kbarticle.title} - {$kbarticle.title}{/if} {if $dlarticle.title} -{$dlarticle.title} - {$dlcat.name}{/if}{if $announcement.title} - {$announcement.title}{/if}</title>

 

<meta name="description" content="{if $dlarticle.title}{$dlarticle.title}, {$dlcat.name} - {$dlcat.description} - {$download.title} - {$download.description}{/if}

{if $kbarticle.title}{$kbcat.name} - {$kbcat.description} - {$kbarticle.title} - {$kbarticle.article|truncate:100}{/if}

{if $announcement.title}{$announcement.title} - {$announcement.text|truncate:100} - {/if}Some generic description" />

 

<meta name="keywords" content="{$pagetitle}

{if $title}, {$title}{/if}

{if $kbcat.name}, {$kbcat.name}{/if}

{if $kbarticle.title}, {$kbarticle.title}{/if}

{if $kbcat.description}, $kbcat.description}{/if}

{if $dlarticle.title}, {$dlarticle.title}{/if}

{if $$dlcat.name}, {$dlcat.name}{/if}

{if $announcement.title}, {$announcement.title}{/if},

someother generic terms." />

 

However, I'm perhaps not as clever as I thought I was. It would appear that the page loads before the variables are populated, resulting in blanks.

 

Any suggestions?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated