Milan Lund logo

Hi, I am Milan Lund!Freelance Web Developer with Kentico Expertise

I specialize in building and maintaining websites on the Kentico platform.

  • Kentico CMS

Get urls of a page's culture versions in Kentico

For SEO reasons you may need to generate alternate link tags with the hreflang attribute in your html output. In this quick tip I will show you a macro expression which generates these links for you in Kentico.

The macro simply goes through culture versions of the current page but for many people it is not obvious how to achieve that. Before you use the macro make sure you place following key into your web.config: <add key="CMSCheckPermissionsForDocumentCollection" value="false"/>. The reason for this is that developers of Kentico do not want to allow public user see documents collections via macro. This kind of security checks was present only in certain number of hotfixes in version 7 and 8. For more info go here: http://devnet.kentico.com/articles/page-macro-expressions-security

Loading...

About the author

Milan Lund is a freelance web developer with expertise in Kentico. He specializes in building and maintaining websites on the Kentico platform. Milan writes articles based on his project experiences to assist both his future self and other developers.

Find out more
Milan Lund