Section Panel field

Blueprints are great and do also allow you to code a custom “design” for every template in Kirby’s / Kirbies panel.

But when you have a complicated blueprint (e.g. a complicated template), both the blueprint and the equivalent in the panel can become cluttered. Off course one can created sections using the default “line” / “info” / “html” fields - but I wanted a quick, and simple tag for this.

So that’s why I created a simple, new Kirby field; section - which you can download at GitHub.

The section-field accepts two basic values;

  1. A short text (the “label”).
  2. An icon (optional).

To make things even more readable in the blueprint, one can also add a visual divider above this field (not needed, but cool to have when writing large blueprints).

###########################################
## YOUR SECTION NAME
###########################################

  section_01:
    type: section
    text: MY NICE SECTION
    icon: info

That’s it… please remember you don’t have to place the ################## lines, it just makes things more readable in the blueprint.

Once done, your panel-equivalent of the blueprint is divided in nice sections (styled gray, with a white font).



Do you know that there is the headline field? It doesn’t support icons but is otherwise pretty similar.

It’s actually a great idea to add icon support to the headline field :smile:

2 Likes

I know the headlines, but can they do this… :stuck_out_tongue:

…yes, that’s right - I transformed my headlines into accordions, so you have a clear view on what you’re doing (the blueprint in this case is very large, because it’s a onepager - sort of… and every field / icon / image / parallax on the homepage you can alter, using the panel).

1 Like