Skip to content
Grav 2.0 is officially stable. Read the announcement →
Forms & Blueprints

Blueprint data-options@ children

Started by Rob Walton 8 years ago · 2 replies · 1015 views
8 years ago

I'm trying to limit the results of a dropdown list to the children of a particular page using something like the following in my blueprint:

TXT
data-default@: /the-parent-page
data-options@: ['\Grav\Common\Page\Pages::children', 'default']

But I get the error Using $this when not in object context because I think, I'm calling a non static method with a static call, or something.

Any ideas?

8 years ago

I'd still like to implement this, does anyone know if it's possible?
Thanks

8 years ago

I've done this the with the ::parents method, but that is a static method.

I don't know how data-options@ is parsed, but perhaps try substituting :: for -> ??

Also the default parameter value doesn't seem correct, though I wouldn't expect this error from that. You should change it to the page path value as per the API docs.

Sorry just some guesses there, I hope you solve it. Try the discord group if you get no joy here.

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1641 6 months ago
Forms & Blueprints · by Hugo Oliveira, 7 months ago
0 328 7 months ago
Forms & Blueprints · by Flachy Joe, 8 months ago
9 427 8 months ago
Forms & Blueprints · by Augustus, 8 months ago
7 442 8 months ago
Forms & Blueprints · by Julien, 8 months ago
10 477 8 months ago