Automatically put shared banner in center of blog

Hi, Is there any way to dynamically place a banner in the center of a blog post?

Some context, we're going to have a rich text editor where users can enter blog content. We'd like a banner to be displayed on the center of their post like you see here:

l know we can manually create a slice that a user can put on the page, but that's not optimal. Looking for a way to get this done dynamically via Plugins, APIs, code, etc.

Thanks in advance,
Jay

Hello!

I was about to suggest to you exactly what you pointed out later, Slices!

Adding content to documents from the Writing room interface or by using the Slice builder, if your project is running in Slicemachine, are the two ways of adding content to your documents.

  • Which technology are you using in your project?
  • If you're not involve with the project code yourself maybe you'll need some help from a dev to add the new elements to your project

The workflow to do so would be something like this:

  1. Convert pages to use slices. Then it should be pretty easy to inject a banner somewhere in the middle of the SliceZone array.
  2. Using an advanced HTML Serializer similar to a solution proposed on this other thread by Sam, you could inject the HTML serializer with the Rich Text block that is around the middle along with the info they need for the banner. Then you could add the banner before or after the middle element with the help of a dev

This issue has been closed due to inactivity. Flag to reopen.