Viewing pagelist and switch layouts to display data

After building a extensive projects archive with the great instructions of @JohntheFish How to build a simple product catalog? - #4 by JohntheFish

Some editors now suggest a button to switch instantly from one to another layout in order to save a lot of mousetrips.

We are adding image/text data to pages with composer. Viewing is done with different pagelists.

If I view a pagelist which shows pagename, thumbnail and description, how could I switch/toggle to another pagelist view showing more data. I’m dreaming of having a toggle button «basic view - extended view» on the page.

How could this be accomplished?

I have installed sccessfuly the pagelist templates.

It could be that this is a very easy thing, I just don’t see it, I end up having two basic links on each pagelist page. Since we have lots of different subpages, I wonder if this could be easier or automated.

Thanks for thoughts for this.

Mareike

I have done stuff like this in the past with adding css classes at a click of a button then hidding or showing data.

Simple example is the grid/list button at the top.

Thank you Tim, for this nice example. We’ve been using De Sandro’s Isotope in the same matter. Unfortunately it does not allow filtering and sorting when in layout modus. I was wondering if there is an easier method within concrete.

Are you also able to switch layouts for entering data in your script?

I am not sure what you mean?

Hello Tim,
Sorry for not being clear…

…When browsing my records I go to «Edit Page», taking me to the «extended» data entering Layout where all 26 fields show.
Here, I wish to go – pressing a button – to the basic layout, showing only the main 8 important fields.

Up till now I have to select the cog icon in toolbar, then go to dropdown of page templates and switch to my basic layout. Then, I’m in the editable layout.

That is what I need, - sort of switching layouts in edit mode.

I suggest you post some screenshots with red-ink to mark exactly what you mean.

I’m not sure, but maybe you could make a button outside the editing mode, in the concrete toolbar and attach a click event? We used that for something similar and it was doing the job.

Thank you for your input, that sounds great. I just don’t know (yet) how to add something to the toolbar.

I got it all working with the exception of properly having the button in the ccm toolbar.
I managed it half way, a weird character in the toolbar shows, but not doing anything.

Any Ideas?

For an extra toolbar button, look into Remo’s GitHub - ortic/ortic-button: package to demonstrate how to add a custom button to the concrete5.7 toolbar and adjust to your needs. It’s a bit old, but code would still work.

THANKS FOR THE INSTRUCTIONS! @MobineLuxor
All working now. Really nice - saving lots of time.

One last thing I’m struggling is how to create the “active” state of the toolbar button. But I’ll find out eventually.

happy to help out.

maybe examine code of existing ccm toolbar with web dev tool in firefox or similar,
you’ll find it.