We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Problem

Template Dividers

Is there a way to place a divider in a perch:repeater? I have a region that is a repeater and would like a divider above it, is this possible?

Nigel Coath

Nigel Coath 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You should be able to have a divider before a repeater, but not within it. The UI doesn't allow for dividers within a repeater.

Problem is I have three regions in a row that are repeater so I presume I cannot do this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you mean that you have three regions that are repeater?

I have several regions one after the other in my template that each have perch:repeater as they are sets of bullet lists or paragraph. For example:

<perch:repeater id="format-text"><p class="client-details"><i class="fa fa-arrow-right"></i> <perch:content id="format-text" type="text" /></p></perch:repeater>

<perch:repeater id="summary-text" label="Project Summary"><p class="project-details"><perch:content id="summary-text" type="textarea" size="s" html="true" editor="markitup" /></p></perch:repeater>

<perch:repeater id="extended-text" label="Extended Info"><p class="project-details"><perch:content id="extended-text" type="textarea" size="s" html="true" editor="markitup" /></p></perch:repeater>

So I cannot put a divider between these can I?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you should be able to put a divider on those.

How?

I tried on the repeater and it did not work.

If I place it on the content inside the repeater it places the divider above or below every repeated instance when I want a divider over all instances of that repeated region.

Is this possible?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show me the code that isn't working?

For example:

If I put it in the repeater

<perch:repeater id="summary-text" divider-before="Project Summary"><p class="project-details"><perch:content id="summary-text" type="textarea" size="s" html="true" editor="markitup" /></p></perch:repeater>

It does not work at all.

If I put it inside the content in the repeater

<perch:repeater id="summary-text" label="Project Summary"><p class="project-details"><perch:content id="summary-text" type="textarea" size="s" html="true" editor="markitup" divider-before="Project Summary" /></p></perch:repeater>

Then it adds the divider before each repeating region inside the repeater wrapper, not what I want.

I just want a way to break up the edit page, but unless you have non-repeater regions above and below a repeater I cannot see how you can use dividers in this scenario.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version of Perch are you running?

2.6.6, the latest

Drew McLellan

Drew McLellan 2638 points
Perch Support

OK, we'll look into it.

Ok thanks, its not a deal breaker but the only other way is to use perch:if around multiple instances but that means adding a set amount in, then I can add dividers.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Looks like there was a bug with it. I've fixed it for Perch 2.7

Okay I will look out for that, what has been fixed divider around a repeater or inside it?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Around.