Clarity Posted August 10, 2021 Posted August 10, 2021 Hello, I have language field on some template. Need to get data from this field via API in order to send it to settings. But if I write, say, $page->language , I get the data only on the page where it is called, but not on "editing" page. So how to get data from $page to "editing" page?
bernhard Posted August 10, 2021 Posted August 10, 2021 Do you mean this? https://processwire.com/api/ref/page/edit-url/ 1
Clarity Posted August 11, 2021 Author Posted August 11, 2021 (edited) Thank you, but not quite. I meant how to get the page data from "editing" page but not reverse. EDIT: Problem solved, $pages->get($input->get->id)->language performs the trick. Edited August 11, 2021 by Clarity Problem solved.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now