To embed social sharing buttons that dynamically share the current CMS page URL, you need to use Webflow CMS fields and dynamically generate the share links.
Create dynamic share links using CMS fields:
https://www.facebook.com/sharer/sharer.php?u=yourdomain.com/blog/[slug]
https://twitter.com/intent/tweet?url=yourdomain.com/blog/[slug]&text=[post title]
https://www.linkedin.com/sharing/share-offsite/?url=yourdomain.com/blog/[slug]
To implement:
https://yourdomain.com/blog/
+ slug field).text=
parameter.If you want to open share links in new windows:
target
, Value: _blank
If you want fully dynamic URLs that include your domain without hardcoding:
window.location.href
, but this only works on the live site and is not part of CMS data editing.Embed example:
window.location.href
to populate share links dynamically.To share only the current CMS page, build dynamic share URLs using CMS fields like Slug and Title. Use External URL links in your CMS Template and concatenate CMS data to create platform-specific links for Facebook, Twitter, and LinkedIn.