Auto-update Snippets

Hi all,

So, I’m looking to make these cool little snippets – like sign-ups and offers – that I can easily add to a bunch of posts and pages. What would be awesome is if I could update these snippets in one spot and have those changes show up wherever I’ve used them. That way, I won’t have to go back and update each post or page individually!

How do I do this?

You can’t at the moment. Once a snippet is inserted into a post there’s no reference to the original snippet. They essentially work like saved copy/pastes.

This can be done, albeit manually. This is how I do it when it comes to signup forms:

We solved this problem at Outpost by creating a dynamic CTA system, where the CTAs and their display position are defined outside of Ghost. Then you can update the CTA and have it change across the site immediately.
The CTAs are also different based on whether the user is unknown, free or paying.

It also has the added benefit of separating CTA from content. The Ghost CTA tools in posts are nice, but CTAs are not content. Having CTAs in your content messes with things like RSS, search and migration.

1 Like