It might remind of a structure field but it’s not. In fact it’s many fields, not one.
Data storage
It’s kind of a data storage for values of different types. All of them is updated live when editing.
Types
So far it’s text, textarea, select and checkbox supported.
Link
There is also a source url / link to the information.
Active
Each field have an active state, on or off (true/false).
Why not a structure field
The structure field is great for dynamically add new sub fields.
In my case I need to set up predefined static fields in the blueprint. I also needed multiple kind of values per field.
What I’m going to use it for
I collect information about other sites. Later I present the information in a new simplified way on the site. Maybe compare different sites in a simple table or card design.
I already have this system outside Kirby but by lifting it inside Kirby I can benefit from the panel features.
Yes I understand it I think. I’m seeing this as a potentially very easy to use menu builder.
I think not. But it’s not easy because the screenshots are in swedish.
Let’s say you have 20+ pages that all contains values by the same keys, like:
profit
age
rent
address
phone
You could use a structure field for it but if you add another key the other pages does not “sync” with it. It can easily end up with different keys/values on different pages.
This field is based an predefined keys that are set in the blueprint. To add another key it needs to be added in the blueprint. However the value is then added in the panel.
Every value can then be active or inactive which can be good on a site. Maybe we don’t know that a value is correct for example.
It also has the feature of adding a url to a source. Let’s say your site is about food and you add “potato” to it. If you later on don’t think you added the correct food you can use the link to go back and look it up again.
I think it’s hard to see the benefits without seeing the actual panel for that second page you sent. Can you show me what that lookis like for the panel user?
Alright. You probably need to click on the image to see it in fullscreen:
All these keys are already there when the page is created in the panel. They are predefined.
If I add a new key in the blueprint it will be presented in all the pages when I visit them in the panel.
The keys are bright gray below the titles.
Everything is in swedish, sorry.
The calculator means that it’s a number field.
The down arrow icon means that it’s a select box with predefined values from the blueprint
Select boxes shows both the value as title and as raw value “Dagar” and “days”.
The question mark means this value is unknown. I’ve not checked it as active.
The link icon means that there is a source to this value.
I’ve opened “Aviavgift” and I see value, source and active.
As I said, it’s used on this site, but the values might not be named as this screenshot exactly. For example the two first values in the screenshots are later presented as an interval on the site.
Do you understand how it works? Do you see the benefit of having it this way?
Is there any difference between having all those fields the standard way in a blueprint (that’s a super long blueprint and a super long page in the panel) in terms of functionality?
I definitely understand the appeal for the user in the panel now for complex structures of data!
If you add a normal textfield you will only get 1 saved text in the content file.
With my plugin you will get 1 text in the content file as well. It will include 1 text, 1 source and 1 active state. That means 3 fields in 1. Why this is good comes next…
Shorter blueprint
With my plugin you setup 100 items, instead of 300 items.
Benefits of that:
Lower risk for errors.
Saves time of adding only a third of the data (because it’s added manually).
Better overview.
Toggle items
Every field I add is a toggle. I open them and se value, source and active. When it’s closed I only see a preview of these things in one line. It takes less space.
Compact style
Like the previous post the toggle saves screen space. Everything is made to save space to have a great overview. I can have 100 fields and still have a good overview. What I do to keep it nice is using one of the tabs plugins. I might have 25 items on each tab.
Without my plugin
Would it be possible to do without a plugin? Yes, but it would be like this:
300 items in the blueprint (instead of 100)
Very long page without a good overview of the fields
The content file would be different where source and active would be own fields, not a part of the value.
I hadn’t understood that each element of 3 fields is in fact only one in the blueprint. How does the blueprint set-up work? Does this make it possible to define groups of blueprint fields then?
fields:
payback_time_max:
title: Löptid max
type: metanumber
payback_time_max_type:
title: Löptid max typ
type: metaselect
items:
days: Dagar
months: MĂĄnader
years: Ă…r
loan_extension:
title: Möjlighet att förlänga
type: metaselect
items:
true: Ja
false: Nej