How to Collapse Sections on Dynamic Pages

Sounds similar to the use case described in this topic: