Forum

Thread tagged as: Problem, Suggestions

Field Groups / collapsible Blocks / Question and Suggestions

Hi Guys,

finally you have a collapsible feature in the admin! We waited a long time for that. Thanks!

I tried to implement it for my existing templates but its not working. I wrapped my complete template code inside a perch:group but no additional collapsible area shows up in the admin. There are already collapsibles showing up for the blocks containing my templates. How would I implement this correctly?

File A:

<perch:blocks>
    <perch:block type="image" label="Bild">
        <perch:template path="file-b.html" />
    </perch:block>
</perch:blocks>

File B:

<perch:group label="Some label" collapse>
    mixed html and perch:content tags
</perch:group>

Suggestions:

  1. add collapse attribute to blocks
  2. save open/closed state (when you edit a long page and save it multiple times and go back and forth between admin and preview its very annoying to have all collapsibles you opened or closed before set back to their default states)

I think without the second suggestion the benefit of this new feature is almost zero.

Regards

Jochen

Jochen R.

Jochen R. 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How long do you think we should save the open/closed state for? Once expanded, should that group always be expanded, regardless of the template assertion?

Ha, thats really a good question. For my scenario it would ideally be for the duration of a session for one user. (User state open/closed overwrites template default open/closed) BUT there could be other scenarios. I think my described scenario is pretty common, though.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll take a look and see what might be possible.