Jump to content

$page->meta() ties data to the page its used on.


EyeDentify
 Share

Recommended Posts

I have been experimenting with the new $page->meta() method and find it useful.

Once i figured out that the data i "save" with it is tied to the page where i called the method from.

So this is not obvious at least not for me in the documentation:

https://processwire.com/api/ref/page/meta/
 

So i just wanted to share that revelation with the community so you don´t get as confused as i was.

Happy Coding Everyone.

  • Thanks 1
Link to comment
Share on other sites

10 hours ago, Markus (Blue Tomato) said:

Hmm, I think it's very clear because it's a method from $page. Everything you do from $page are tied to the page itself.

Thats great for you. But still nothing in the documentation suggests that it´s obvious just because its a method of $page.

It´s says the data is independent of the fields of the page and such lead me to belive i could call $page->meta() from any page and get the data back that i saved.

Anyhow, this post is for the people who don´t think its obvious.

We are all different.

But thank you for your input Markus.

have a nice day and happy coding.

  • Like 4
Link to comment
Share on other sites

  • 1 year later...

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

×
×
  • Create New...