Hey everyone,
I am building an online archive of plants and animals which should be navigable with a list view similar to MacOS Finder column view.
For the frontend I came across this npm package which is quite exactly what I need. https://markmatyas.dev/finderjs/
The package loads the data either as am array or as a function.
However I wonder how can I use Kirby to create this array in the backend? Is there an adequate module? I imagine the user to be able to add an item to the archive by creating a new page for the new plant and choosing some hierarchical tags for it (eg. Flora > Flower > Sunflower). These tags should then be converted to the array and so on the overview page the list is automatically updated.
Any help on this would be great – Thank you!
best,
Markus
The script represents a folder structure with data visually, but not lists or tables with text content, as desired in your example. Or am I misunderstanding your requirement?
Yes, it does not contain the data in form of a HTML list but in form of an array.
You can see the array that is the basis for the column view in the example below. This (in the code the var “data”) is what Kirby would need to create, if possible:
As there is not answer, it seems, that that it is not possible to write the data array above containing the column items from out of Kirby.
So I decided to implement the different columns and their sub-columns in the Kirby folder structure as pages. Meaning that I will have each column as a list of folders/pages inside my “content” and then inside these again the folders/pages of the next column. “Title” would be used to display the single items in the columns, in my case titles would be “flora”, “fauna”, “water”… for column 1. Then “flowers”, “trees”, … for column 2. And so on.
Then I would read out the column structure by getting the names of each subpage using $page->title() and from there generate the column table in the html frontend.
Does this make sense? Any comments highly appreciated. Thank you!