Split site-blueprint (tabs) onto different Views

Hi,

in our project we use tabs to organise the site blueprint quite often. We recently came to the point were a higher organisation attribute would had helped to improve the user experience. The idea was born to add a second “Site-View” which is able to filter out the relevant tabs.

What i achieved is:

  • added an attribute to the blueprint-tabs as filter criterium
  • added a second view and made it availble in the menu
  • overrided the links according to the pattern (wether coming from “myview-link” or normal “view” link

The problem is: in order to differentiate which view to open a second URL/route pattern is needed (‘myview’ rather than ‘site’). Consequently all subsequent URLs and also the API routes must be changed which might be quite effortly.

What i originally wanted to achieve was simply: add another view which uses the same site model as the site view as all the data being shown and configured and myview also belongs to the site. So the question is:

How could i share the site model with the a second view.

Any help is appreciated.

Best, Thomas

Hi Thomas,

I can’t really answer your question, but have my doubts that this will work.

The first steps would in any case be to create a view that creates a form from a blueprint.

But I see a problem with posting to the same model, locking, race conditions when saving, storing to local storage…

I guess @distantnative could shed more light on this.

I’m with @texnixe on this. It could be technically possible but it would need a looot of work reimplementing many features of the site view. I wouldn’t be sure myself how this could be achieve without diving hours down the rabbit hole. It’s a project that I personally wouldn’t pursue as I’d be afraid it also breaks too easily with future Kirby updates.

if I had the needs you describe, I would rather set up a dedicated config page with subpages. Then add a custom site method and a page model for that config page to streamline accessing the config settings.