Hello folks,
i got another question today. SRY!
I use in my homepage 4 different sections for my content. (Testimonials, Services etc.)
Now i want to sort these snippets over the panel. The best thing would be by “drag and drop” these snippets like i do which subpages or if i use the snippetfield plugin. I couldnt figure out a way yet.
Has someone done the same before?
Thank you so much!
Florian
How are the section stored? As subpages, modules, structure entries?
They are stored as structure entries
Structure entries are sortable via drag and drop.
ok then i descriped it the wrong way. I use different structures for every section.
For example i use for my services follwing blueprint:
services:
label: Services
type: snippetfield
style: table
fields:
servicename:
label: Title
type: text
width: 1/2
required: true
description:
label: Description
type: textarea
required: true
url:
label: URL
type: url
width: 1/2
help: Button url
required: true
switchNew:
label: NEW Label
type: switch
texts:
- shown
- hidden
width: 1/2
help: Adds a Label
And the snippetfield for another section looks different cause i have to user other fields.
I see. Maybe you can use the Kirby Sortable plugin, I’m not sure. Another option would be to an additional structure field with a select for each snippet.
Ok that was also my idea to add an additional snippetfield.
But i couldnt figure out how i can use that cause i call my snippets like normal in my home.php
<?php snippet('home/services') ?>
so how can i connect my snippets to that additional snippetfield.
Hope u understand it… im very bad in describing.
Structure field
snippets:
label: Snippets
type: structure
fields:
select_snippet:
label: Select a snippet
type: select
options:
services: services
testimonials: testimonials
whatever: whatever
In your home template:
<?php
$snippets = $page->snippets()->structure():
foreach($snippets as snippet) {
snippet('home/' . $snippet->select_snippet());
}
That helped me a lot 
Thanks a lot it worked!