Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm trying to write a modifier, which gives back a boolean, if the provided page has children (in an structured collection) or not.
This is my html structure:
As you can see I'm basically
Here is the modifier, i tried a lot, but I give you a simple example which does not work. And I don't understand why:
Unfortunately this does not work:
[03:21:54] LOG.notice: Error in [haschild] modifier: Call to undefined method Statamic\Structures\Page::children()
If I debug
$page
i will get something like this:So somewhere, there is this children array. But how to access it properly?
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions