Forum

Thread tagged as: Question, Suggestions

Nested or Collapsable Repeaters

I constantly find myself wishing for the ability to nest repeaters.

Ideally, a way of putting a repeater tag inside another repeater tag (just 1 level of nesting would probably cover every case I've ever needed it).

Instead I find myself having to consider the maximum number of repeated elements (say 6) and so creating 6 fields inside the main repeater tag. This works well of course, but it means the template page ends up very cluttered.

I suppose another solution to my main issue would be a way of collapsing repeater items, so that it displays a more manageable amount of content. The problem is that if a repeater has 30 items (for example) and each repeated item has many fields, it takes quite a while to navigate the large page. It would be simpler if there was just a collapsed set of 30 lines (for example) so that clicking on a "+" uncollapses the item for editing.

This isn't a problem as such, just a couple of suggestions on how I feel the template page could be improved - and I suppose I'm curious whether or not you're already planning to apply either of these things in future versions.

Thanks

Matthew Lymer

Matthew Lymer 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The problem is that if a repeater has 30 items (for example) and each repeated item has many fields, it takes quite a while to navigate the large page.

The idea of a repeater with 30 items fills me with horror.

What sort of things are you using repeaters for?

Likewise, it fills me with horror, but I don't have many other options.

I'll give you a brief overview:

  • There are 4 main categories
    • Each category has many messages
      • Each Message has up to 6 media types
        • Each Media type is available in up to 5 different languages
          • Each Language has up to 4 different versions (depending on user role)

My region allows multiple items (each representing a message) and contains a repeater (which allows you to add media types). however after that, we still have up to 20 variations (the languages and user versions), so all 20 of these have to be given as explicit fields.

As you can see this isn't exactly the simplest structure in the world...

Drew McLellan

Drew McLellan 2638 points
Perch Support

I wonder if this wouldn't better be handled with relationships in Runway. Had you explored that?

I did - although I didn't see it adding any real advantage. Perhaps allowing for s slightly neater interface, but I would still have to use hefty repeaters - plus it may make navigation too complex (granted the regions themselves are quite complex at the minute, but navigating to each message and media type at the minute is quite user friendly).

No worries - I think I'll keep it as is, but I may adjust some of the backend perch files to enable "collapsing" on repeater items (I take it I legally have the right to make changes to the source code of the perch admin files?)

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you change any files we can't offer you support.

Oh ok, fair dos!

I'll hold off on that unless I feel it's the only option.