Canonical Link for CG Calendar Event detail pages
Posted: Thu Mar 18, 2010 5:43 am
To generate an event's canonical link add this to the top of your Event Display (Detail) template:
Be sure to include the canonical link in your template:
Code: Select all
{capture name='cann' assign='canonical'}{$gCms->config.root_url}/{$smarty.get.page}{/capture}
{assign var='canonical' value=$canonical}
Code: Select all
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}