hi!
first of all: i know there is content representation etc; but i need to dump the whole content of a page into an array of json objects.
my use case for this is to produce the same data structure that using kirby’s official APIs would do, but as i need to compose frontend pages from 3-4 kirby pages, and currently kirby does not allows to do multi-page API calls, so i need to cut on the http call time somehow…
i came across the dump
helper which is kinda doing what i need, but it always start the dump with:
<pre>Kirby\Cms\Content Object( /* dump content */ ...
how do i just grab the inside of the Object (…)?
thanks!
af
— EDIT
i get why dump()
is printing that extra infos, makes sense.
i also tried to do directly something like
$kirby->site()->children()->find('join')
but i get back this
[{"content":null,"translations":null,"children":null,"drafts":null}]
and if i directly call a field, eg
$kirby->site()->children()->find('join')->title()
it returns back the value correctly.
somehow i want to automatically print all the field of a page, including files etc, in the same way that the kirby APIs is doing that