Jonathan Lahijani Posted September 21, 2019 Share Posted September 21, 2019 I have a Page field and in ProcessWire, I can get values from it like this: $page->my_page_field; // returns the ID $page->my_page_field->title; // return the title Given my particular situation, I'm hitting an infinite loop as I documented here a few years ago:https://github.com/ryancramerdesign/ProcessWire/issues/1962 Is there a way to ONLY get the raw ID of the assigned page without ProcessWire getting all the attributes of that page leading to the loop? Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted September 21, 2019 Author Share Posted September 21, 2019 I see that if I enable auto-join for the field, then it circumvents the issue. So that's one solution. Link to comment Share on other sites More sharing options...
Robin S Posted September 22, 2019 Share Posted September 22, 2019 There's this module which was created to work around that exact issue: https://modules.processwire.com/modules/fieldtype-page-ids/ 1 Link to comment Share on other sites More sharing options...
bernhard Posted September 23, 2019 Share Posted September 23, 2019 On 9/22/2019 at 1:13 AM, Jonathan Lahijani said: I see that if I enable auto-join for the field, then it circumvents the issue. So that's one solution. That sounds like a good solution. Are you not happy with it? RockFinder2 might be overkill here, but if you have it available it might be an option: "owner" is a regular single page field. Or if you need multi-page-values: Link to comment Share on other sites More sharing options...
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