I love the repeater layout block functionality and how it allows you to have different types of content within a repeater and allow users to choose what displays. I am developing a newsletter that requires each added section to have a title, for example if there is a portfolio works section I would want it to look like this:
Some work I've done since I've last communicated with you.
Portfolio Item #1
Portfolio Item #2
Portfolio Item #3
The problem is I can add a title into a layout block, but it'll repeat it for ever block added in. I could add it outside of the repeater, but it'll always show. I only want the title to show for a layout block if inserted.
I tried using first-child to only display the first instance of a layout title and hide the rest, but due to the fact styles are inlined, this didn't actually work. Is there another way I can achieve this? I tried searching, but couldn't find anyone else asking which is weird because I assumed a lot of people would be doing this.
Hi there DigitalSea, sorry about the late response here. My advice:
- If you create a layout with a <singleline> heading and <multiline> article, you can delete the heading within when not required. Just remove the default text in the email editor and the article text will shift up in place (ie. no extra padding/margins) :)
- The other option is to create separate layouts for headings only, article text only, indented items, you name it
Thanks, DigitalSea - let us know if you have any questions about this :)