A temperory SEO fix for Meta Tags in WikiPage
Hi,
Not sure if this is a correct method and it would work for everyone... however. i still would post it here if it helps anyone like me.
Meta Tags, - title, description and keywords can be Fetched from the description of the wikipage.
Please note, that after the change, the title, meta description and meta keywords will all be the same. but this is still better than the common meta tags throughout the site.
Below is what i did:
< title >
{if $page ne ''} {$description|escape}
{elseif $trail}{breadcrumbs type="fulltrail" loc="head" crumbs=$trail}
{else}
{$siteTitle}
{if $headtitle} : {$headtitle}
{elseif $page ne ''} : {$page|escape} {* add $description|escape if you want to put the description + update breadcrumb_build replace return $crumbs->title; with return empty($crumbs->description)? $crumbs->title: $crumbs->description; *}
{elseif $arttitle ne ''} : {$arttitle}
{elseif $title ne ''} : {$title}
{elseif $thread_info.title ne ''} : {$thread_info.title}
{elseif $post_info.title ne ''} : {$post_info.title}
{elseif $forum_info.name ne ''} : {$forum_info.name}
{elseif $categ_info.name ne ''} : {$categ_info.name}
{elseif $userinfo.login ne ''} : {$userinfo.login}
{elseif $tracker_item_main_value ne ''} : {$tracker_item_main_value}
{elseif $tracker_info.name ne ''} : {$tracker_info.name}
{/if}
{/if}
< / title >
< meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
< meta name="description" content="{if $page ne ''}{$description|escape}
{elseif $trail}{breadcrumbs type="fulltrail" loc="head" crumbs=$trail}
{else}
{$siteTitle}
{if $headtitle} : {$headtitle}
{elseif $page ne ''} : {$page|escape} {* add $description|escape if you want to put the description + update breadcrumb_build replace return $crumbs->title; with return empty($crumbs->description)? $crumbs->title: $crumbs->description; *}
{elseif $arttitle ne ''} : {$arttitle}
{elseif $title ne ''} : {$title}
{elseif $thread_info.title ne ''} : {$thread_info.title}
{elseif $post_info.title ne ''} : {$post_info.title}
{elseif $forum_info.name ne ''} : {$forum_info.name}
{elseif $categ_info.name ne ''} : {$categ_info.name}
{elseif $userinfo.login ne ''} : {$userinfo.login}
{elseif $tracker_item_main_value ne ''} : {$tracker_item_main_value}
{elseif $tracker_info.name ne ''} : {$tracker_info.name}
{/if}{/if}" />
< meta name="keywords" content="{if $page ne ''}{$description|escape}
{elseif $trail}{breadcrumbs type="fulltrail" loc="head" crumbs=$trail}
{else}
{$siteTitle}
{if $headtitle} : {$headtitle}
{elseif $page ne ''} : {$page|escape} {* add $description|escape if you want to put the description + update breadcrumb_build replace return $crumbs->title; with return empty($crumbs->description)? $crumbs->title: $crumbs->description; *}
{elseif $arttitle ne ''} : {$arttitle}
{elseif $title ne ''} : {$title}
{elseif $thread_info.title ne ''} : {$thread_info.title}
{elseif $post_info.title ne ''} : {$post_info.title}
{elseif $forum_info.name ne ''} : {$forum_info.name}
{elseif $categ_info.name ne ''} : {$categ_info.name}
{elseif $userinfo.login ne ''} : {$userinfo.login}
{elseif $tracker_item_main_value ne ''} : {$tracker_item_main_value}
{elseif $tracker_info.name ne ''} : {$tracker_info.name}
{/if}{/if}" />
{if $metatag_keywords ne ''}
{/if}
{if $metatag_author ne ''}
{/if}
{if $metatag_geoposition ne ''}
{/if}
{if $metatag_georegion ne ''}
{/if}
{if $metatag_geoplacename ne ''}
{/if}
{if $metatag_robots ne ''}
{/if}
{if $metatag_revisitafter ne ''}
{/if}