Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Canonical tag on head (news document). View modes: 
User avatar
Member
Member
Leandro Brito - 10/31/2011 2:17:50 PM
   
Canonical tag on head (news document).
Hi,

I have two sites on kentico and both is related with news.
I need put canonical tags in second site pointing for the other.

Example:

www.maindomain.com/news/kentico-release-v6.aspx
and
www.seconddomain.com/news/kentico-release-v6.aspx

The second site need a canonical tag on <head> with pointing to address "www.maindomain.com/news/kentico-release-v6.aspx".

How can I do this? Is it possible to do this without change the kentico files like portaltemplate.aspx.cs or similars?

Thanks.
Leandro

User avatar
Member
Member
kentico_edwardh - 10/31/2011 6:31:49 PM
   
RE:Canonical tag on head (news document).
Hello Leandro,

I am not sure if you have already seen these, but I think they might be helpful:

Canonical link elements in Kentico CMS

Web part for rendering canonical links

Best Regards,
Edward Hillard

User avatar
Member
Member
Leandro Brito - 10/31/2011 6:52:49 PM
   
RE:Canonical tag on head (news document).
Thanks Edward.

I saw the first link and did the automatic canonical using CMSCustom.cs file, but I thought that exist one way without change .cs files. I don't like edit cms files because of upgrades to new versions. Anyway, I did the code to implent the canonical link.

This kind of change can be lost or cause problem in a future upgrade to version 6?

Best Regards.
Leandro

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 11/16/2011 4:25:32 AM
   
RE:Canonical tag on head (news document).
Hello,

Due to backward compatibility mechanisms, the code in CMSCustom.cs should be working in version 6.0 after upgrade (if you enable the compatibility mode).
Please see a detailed description in our CTO's blogpost Code-customization-in-Kentico-CMS-6

Regards,
Zdenek