Go to main content

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?

Social media share urls enhanced by Kentico macros

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 #%}
Milan Lund

is a freelance web developer and a proud Basenji owner. His specialties are Kentico CMS/EMS and Kentico Cloud.

Further reading

all posts
  • Kentico CMS & EMS

    What is Kentico

    In this article you'll find a short summary about what Kentico is.