- Kentico CMS
Social media share urls enhanced by Kentico macros
Requirements of nearly every website ask us to incorporate links for sharing content on social media. There are tools out there which generates these links for us. But what if we want to generate them automatically on our websites?
In this short article I will provide you with Twitter, Facebook, LinkedIn and Google+ share urls enhanced by Kentico macros which you can place in your template and let them generate automatically.
https://twitter.com/home?status={% UrlEncode(CurrentDocument.DocumentName)#%}%20{% UrlEncode(CurrentDocument.AbsoluteUrl)#%}
http://www.facebook.com/sharer/sharer.php?u={% CurrentDocument.AbsoluteURL #%}
https://www.linkedin.com/shareArticle?mini=true&url={% CurrentDocument.AbsoluteURL #%}&title={% UrlEncode(CurrentDocument.Name)#%}&summary=&source=
https://plus.google.com/share?url={% CurrentDocument.AbsoluteURL #%}
About the author
Milan Lund is a Full-Stack Web Developer, Solution Architect, and Consultant for Xperience by Kentico projects, working as both a freelancer and a contractor. He specializes in building and maintaining websites using Xperience by Kentico. Milan writes articles based on his project experiences to assist both his future self and other developers.
Find out more