double canonical link
Posted: Tue Mar 17, 2015 8:14 pm
Hallo
i have 2 link in the html code for the same page
why ?
the page is this
http://www.gianlucacompagno.com/servizi ... mona-Crema
my template is
{strip}
{process_pagedata}
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<__html lang='{$nls->htmlarea()}' dir='{$nls->direction()}'>
<head>
<title>{title} - {sitename}</title>
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
{metadata}
{metaog}
<meta charset='{$nls->encoding()}'>
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0 user-scalable=no' />
<meta name='HandheldFriendly' content='true' />
--------------------------------------
i need to delete the secondary wrong url
<link rel="canonical" href="http://www.gianlucacompagno.com/servizi ... mona-Crema" /><base href="http://www.gianlucacompagno.com/" />
if i delete the {metadata} tag, the wrong url disappears
but of course disappear also other information
where am I wrong?
thaks
i have 2 link in the html code for the same page
why ?
the page is this
http://www.gianlucacompagno.com/servizi ... mona-Crema
my template is
{strip}
{process_pagedata}
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<__html lang='{$nls->htmlarea()}' dir='{$nls->direction()}'>
<head>
<title>{title} - {sitename}</title>
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
{metadata}
{metaog}
<meta charset='{$nls->encoding()}'>
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0 user-scalable=no' />
<meta name='HandheldFriendly' content='true' />
--------------------------------------
i need to delete the secondary wrong url
<link rel="canonical" href="http://www.gianlucacompagno.com/servizi ... mona-Crema" /><base href="http://www.gianlucacompagno.com/" />
if i delete the {metadata} tag, the wrong url disappears
but of course disappear also other information
where am I wrong?
thaks