[solved] Canonical URL on Products detail page
Posted: Fri Oct 04, 2013 3:09 pm
Hi
I have an installation of Products on CMSMS 1.11.7 using pretty URLs. I call it with:
so it lists all Products on a page like "http://www.example.com/portfolio
I have the usual canonical call in the HEAD of the page template:
So this produces the canonical link "http://www.example.com/portfolio on the main Products list page. So far so good.
When I click a Product to see more details it uses the same page template and goes to a URL like "http://www.example.com/portfolio/3/24/Nice-Product-Name
But the canonical URL in the HEAD remains as "http://www.example.com/portfolio
How can I change the canonical URL in the HEAD to match the real pretty URL of "http://www.example.com/portfolio/3/24/Nice-Product-Name
Thanks!
I have an installation of Products on CMSMS 1.11.7 using pretty URLs. I call it with:
Code: Select all
{Products sortby="f:sortby"}I have the usual canonical call in the HEAD of the page template:
Code: Select all
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}When I click a Product to see more details it uses the same page template and goes to a URL like "http://www.example.com/portfolio/3/24/Nice-Product-Name
But the canonical URL in the HEAD remains as "http://www.example.com/portfolio
How can I change the canonical URL in the HEAD to match the real pretty URL of "http://www.example.com/portfolio/3/24/Nice-Product-Name
Thanks!