Jump to content

Get field from parent with $page->get()


diogo
 Share

Recommended Posts

Would be really nice to be able to do this when outputting a field:

$page->get("field|parent.field")

I was already looking in the coreto see how it could be done, but got lost :D

In theory it shouldn't be too hard, since it works already with pages selectors... or?

Link to comment
Share on other sites

Oh, thanks LostKobrakai!

Meanwhile I used a pretty decent solution to do the same (even better because it goes further in the tree).

Here it is for those interested:

$page->closest("info!=")->info
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...