Insert structure field via Kirbytag

Hey there.
I am looking for a way to insert a table referencing data from a structure field.

  1. Structure field, populate it with table data
  2. Insert via Kirbytag as table

Is this possible somehow?

Short answer: yes, I think so :wink:!

Is the structure field data on the same page?

Sure!
Extra bonus points for a way to generate any number of tables and use them simultaneously!

I don’t understand what you mean… (or maybe I don’t want any bonuspoints :wink:)

Well, I need a dynamic solution instead of having always exact same number of tables / structure fields :wink:

That shouldn’t be a problem. If you tell the kirbytag which field on the page to use, that should be pretty easy.

Bla bla bla

(table: mystructurefield class: abc)

bla bla bla

(table: myotherstructurefield class: xyz)

and in your tag, you get the data from the structure field in a loop and create the table from it.

1 Like