Is there a way to access all and any field types in from a data txt file?
I want to be able to have the default.php template file be able to to automatically read any and all data types, eg.:
The dummy content, 1-about/about.txt with a new and random field:
Title: About Us
----
Text: Lorem ipsum dolor sit amet, con.
## Lorem Ipsum
In enim justo, rhoncus ut, imperdiet.
(image: about.jpg)
----
otherThing: testest
Here we have 3 fields:
1 - Title
2 - Text
3 - otherThing
The 1st two are fairly straight forward and std fields… however the 3rd is non-standard. The default template file might look like:
“Non-standard field names” don’t exist. You can and should use any appropriate field name with Kirby, there are no limitations. What are you trying to do? Maybe there’s an easier solution.
I am putting together something along the lines of an “attribute view gui” from eZPublish. Default view snippets for different data types. But to be able to start doing this i needed to be able to cycle through the different data fields in any given *.txt content file. The reason is two fold, the obv being this will make templating life a little easier. The other generating correctly formatted content for a rest api of which angular can plug into.