Concept of field populated with data

I have not made the tabs.

See screenshot down the page…

The gif background is a little off as always:

What this is

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.

Questions

  • Do you understand the function and purpose?
  • Do you like it?
  • Do you want it?

(click on it)

3 Likes

This is great Jens, is there a way to see the code?
To answer your questions:

  • Yes I understand it I think. I’m seeing this as a potentially very easy to use menu builder.
  • I just clicked on the like button. So yes.
  • I do want it sir.

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.

Now let’s have a real live example:

Look at the facts on this site:
https://vardagsfinans.se/vivus

A table with data.

Anyway, the result is this:

With lots of data it’s nice to have a system that works. Now I have all the data inside the panel and I can compare items in a nice card view:

https://vardagsfinans.se/smslan

Then the data is combined with content, images and texts, but the data is in one place and the content in another in the panel.

1 Like

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!

Yes there are some major differences.

3 fields in 1

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?

My blueprint looks like this:

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

The content looks like this:

Payback-time-min: 

-
  active: true
  source: "https://www.example.com/"
  value: "1"

----

Payback-time-max: 

-
  active: true
  source: "https://www.example.com/"
  value: "30"

So, it’s only one content field with different values, kind of like content “groups”.

That’s brilliant! I can see a lot of instances when I would have liked to have that!