I have a structure field in my blueprint:
mitglieder: label: Einträge auf der Warteliste type: structure style: table fields: vorname: type: text label: Vorname nachname: type: text label: Name # ...
As I’m not happy with the way big tables are displayed in the panel, I would like to build my own view for the data in the structure field. I figured that I would probably have to build a custom field plugin.
tabellenansicht: fields: tableview: type: tableview
In this plugin I would like to loop over the data from the structure field and thus build my table row by row for output in the panel.
- How can I access the data in the structure field in my custom plugin?
- Where would I put the looping part? In the index.php or the index.js? What is the code that I need to achieve this? (docs are very sparse on this)
- I suppose most of my HTML-code should go into the template property in my index.js?! I guess if I have some more lines of HTML code it gets really hard to read if I put it all into the string-value of the template property (quotes in quotes, line breaks etc.). Is there any way to store HTML code separately (e.g. in a <template>-tag) where it’s more readable?