a-ok Posted January 26, 2017 Share Posted January 26, 2017 I couldn't find an answer to this but is it possible to use ->get() (to retrieve one page) that's a repeater page (i.e hidden). I wasn't sure if you could add "include=hidden" to a ->get(). Thanks! Link to comment Share on other sites More sharing options...
kongondo Posted January 26, 2017 Share Posted January 26, 2017 (edited) get already assumes an include=all (that includes hidden). Quote Note that $pages->get("..."); is not subject to this behavior (or access control) and "include=all" is assumed. This is because requesting a single page is a very specific request, and not typically used for generating navigation. http://processwire.com/api/selectors/#access_control Edited January 26, 2017 by kongondo Link to comment Share on other sites More sharing options...
a-ok Posted January 26, 2017 Author Share Posted January 26, 2017 5 minutes ago, kongondo said: get already assumes an include=all (that includes hidden). http://processwire.com/api/selectors/#access_control That's what I thought but simply trying something as quick and easy as this (1156 is a repeater row page). $test = $pages->get(1156); echo $test->title; returns nothing Link to comment Share on other sites More sharing options...
kongondo Posted January 26, 2017 Share Posted January 26, 2017 Repeater rows pages do not have a title field ....,hence you not getting anything back. If you did the below, you should see something like ' 1482226910-677-1 ' $test = $pages->get(1156); echo $test->name; 3 Link to comment Share on other sites More sharing options...
a-ok Posted January 26, 2017 Author Share Posted January 26, 2017 1 minute ago, kongondo said: Repeater rows pages do not have a title field ....,hence you not getting anything back. If you did the below, you should see something like ' 1482226910-677-1 ' $test = $pages->get(1156); echo $test->name; OH MY GOD What a fail. 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