I created a section template. On my home page, I use the Template element to add the template to my page. I’d like to use a data attribute and css to set the section’s background color. If I render the section with a wrapper I can use the data attribute. The problem is, the section is wrapped in a div. If I turn on Render without wrapper then the data attribute is not added to the section. How can I accomplish this?
I was going to suggest using a component, but a color picker property doesn’t exist yet.
You could probably work around this by pulling the section out of the template, and putting the attribute on the untemplated section, then putting the template element inside of the section.
I ended up leaving “Render without wrapper” off. This puts the section inside of a div so I used css and set the div to display: contents. Everything works now.
1 Like