Allow user to change view of repeater list

I have a repeater, used as a search results list.

I want the user to be able to switch between a ‘card view’ and ‘list view’.

The page also has filters.

What would be the best approach to enable the user to switch the view but retain the filters?

Use globalVariables to store it with multipage transitions (like DisplayMethod variable and set it to either Card / List.
Or possible simpler method on one page prepare dynamic panel with two states (Card/List) with repeater
Just my thoughts Karel

my thoughts are if the repeater item is a dynamic panel with two states (one card, one list)…if…

  1. click button
  2. trigger event within item to change panel state
  3. all items change panel

I don’t think the items in the list would be in the right position.

Ie - if the second view is much smaller…the position of the items won’t all re-jigg itself.