Soma Posted September 4, 2011 Share Posted September 4, 2011 How can I get the page object, which was selected in the radio box list? $id = $page->pagefield_radios; // page field with checkboxes - returns id of selected: 1183 (as string?) $cat = $pages->get($id); echo $cat->title; // returns nothing echo $cat // returns 1 (id of root Home) $kat = $pages->get(1183); // id entered directly echo $cat->title; // returns correct "Acryl" Link to comment Share on other sites More sharing options...
apeisa Posted September 4, 2011 Share Posted September 4, 2011 I think you have it already: $page->pagefield_radios->title; or $cat = $page->pagefield_radios; $cat->title; Link to comment Share on other sites More sharing options...
Soma Posted September 4, 2011 Author Share Posted September 4, 2011 You're right thanks! I was confused as the script wasn't working because I made a error and I checked what the $page->pagefield_radios returns... Link to comment Share on other sites More sharing options...
apeisa Posted September 4, 2011 Share Posted September 4, 2011 Yep. Happens so often here too. Should always remember to use var_dump($var) instead of echo, when doing quick debugging. 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