Hello,
I was wondering if it is possible to fetch the entire content of the first child of a page instead of just single elements?
Something like this would be nice:
<?= page("firstpage")->children()->first()->content() ?>
Hello,
I was wondering if it is possible to fetch the entire content of the first child of a page instead of just single elements?
Something like this would be nice:
<?= page("firstpage")->children()->first()->content() ?>
What do you want to achieve?
Your code will return a content object, https://getkirby.com/docs/reference/@/classes/cms/content/data
Thanks for your answer @pixelijn. I have a sidebar with a list of links to my subpages. When the page first loads, I want the content of the first subpage to be displayed.
Well, but you likely don’t want a complete blob of raw page content. Considering that different types of fields need different field methods applied like format a date, call kirbytext on a textarea etc), this doesn’t seem to make too much sense?