Edit A Template, Apply Changes Across All Posts

Hello,

Consider a template that has been applied to a number of posts.
Now if i edit this template, can the changes be reflected across all the posts that have been published with this template applied?

At present when i edit the template, i’ve to manually re-insert the template across all posts for the changes to be applied.

Thanks

Hi Dushyanth,

you can use the template element inside of your posts and assign your „global“ template to it instead of inserting the template directly to the post. This way, it gets automatically updated when you update the template itself.

Best regards,
timmse

@timmse "you can use the template element inside of your posts and assign your „global“ template to it "

should i set a condition for the template in template settings? what i’m trying to do is set a template for a specific post category i.e all posts with the category “news” will have a specific template applied. Changes to this template will be reflected across all news posts

Ah sorry, I misunderstood (maybe I shouldn’t answer questions right after I get up) :sleeping::sweat_smile:

Exactly, if you want to set a specific template for a specific category, add another condition that only applies to the category.

You can create a general template
for posts and another one that applies to posts and the specific category.

:grinning: thanks @timmse
just a feedback, would be better if the conditions can use chaining like ACF (and / or conditions)

Well, and/or wouldn’t help you in your case. You want the template to be valid for posts (condition 1) of a specific category (condition 2). You need a different template for all other posts anyway because the layout for all other posts that don’t belong to the category probably looks different or contains different elements.

I think you mean conditions for certain elements within your template, so the element is only shown in some instances.

For example, you have a single post template that applies to all posts. You have a CTA button in this template, but you want the button to show on posts of a specific category only. Currently, you can only implement this with two templates (as already described).

The Conditional Logic Feature is already in the pipeline and will be included in one of the next Bricks versions.

1 Like