We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Suggestions

perch_collection_create

For creating a 'from scratch' Runway website, where the end user can build the site structure from scratch from within Perch Admin, it would be useful to have a perch_collection_create function, that works in the same way as perch_content_create.

This way, for example, if they decide to use the template named 'portfolio' the 'Portfolio' Collection would be created.

Simon Clay

Simon Clay 127 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you commonly want to dynamically creation collections? That seems a bit odd to me.

Simon Clay

Simon Clay 127 points

Oh, ok. The ability to deploy a Runway installation where the client can build the site using Master pages for Home, Portfolio, Gallery, Testimonials, Contact, or Default etc pages didn't seem that odd to me.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Surely you are creating the Master Pages so at the same time you could create the Collection? In case they wanted to use it.

Simon Clay

Simon Clay 127 points

Yes, I could, that's true.

l could also install Blog, Events, Members, Podcasts & Shop Add-ons, just in case they wanted to use them, but that doesn't feel very 'Perch-like'.

I thought it would be quite useful to be able to prepare an empty Runway installation that has a set of commonly used Master page types that could create Collections if used. especially if it could have a manage-from-this-page' => true, and include-in-app-menu' => true, options

perch_collections_create('Testimonials', [
        'template' => 'testimonials.html',
        'manage-from-this-page' => true,
'include-in-app-menu' => true,
    ]);

I can get almost the same effect with perch_content_create with list and detail, so it's not holding me back, it was just an idea.

Drew McLellan

Drew McLellan 2638 points
Perch Support

We'll give that some thought.