BFD Calendar Posted August 1, 2018 Share Posted August 1, 2018 Scratching my head, this works on a few sites but not on this one http://www.clubmoral.com/tourdates/... $features = $pages->find("template=concert, sort=-concnr"); echo "<ul>"; foreach($features as $feature) { // LOCATION FROM PLACES PAGE $placepage = $pages->get("template=places, id=$feature->place"); echo "<li><b>{$zeroconcnr} / <a href='{$feature->url}'>{$feature->title}</a></b> on {$fullstartdate->format('d M Y')}{$festival} in {$placepage->title}, {$placepage->city->title}, {$placepage->country->title} (ID={$placepage->country}). <i>{$video} ---{$feature->pagecounter}</i></li>"; }; echo "</ul>"; 'city' and 'country' are page fields on template 'places'. The title shows up, and '$placepage->country' shows id but '$placepage->country->title' doesn't show the title. Anything to do with the PHP version (5.4) on that site? It's the only thing that's different from the ones where it works fine. Link to comment Share on other sites More sharing options...
elabx Posted August 1, 2018 Share Posted August 1, 2018 Ar the fields set to save single pages? 1 Link to comment Share on other sites More sharing options...
BFD Calendar Posted August 1, 2018 Author Share Posted August 1, 2018 8 minutes ago, elabx said: Ar the fields set to save single pages? Page Auto Complete, set to multiple pages but change to single page makes no difference. Link to comment Share on other sites More sharing options...
BFD Calendar Posted August 1, 2018 Author Share Posted August 1, 2018 Ha! Found it in the 'details' tab, I was looking in the 'input' tab. Link to comment Share on other sites More sharing options...
dragan Posted August 1, 2018 Share Posted August 1, 2018 (edited) I think you simply miss a comma before (ID={$placepage->country} in your selector string... sorry - didn't properly read/understand the post... pls disregard, or some admin can delete my post entirely. Edited August 1, 2018 by dragan too hot to ponder about code... Link to comment Share on other sites More sharing options...
BFD Calendar Posted August 1, 2018 Author Share Posted August 1, 2018 @dragan I was only using this to check if it showed the ID of the page I wanted the title of. But in the meantime the problem is solved. Any idea how to mark a topic as 'solved' by the way? Link to comment Share on other sites More sharing options...
louisstephens Posted August 1, 2018 Share Posted August 1, 2018 Glad you figured it out! You can edit your first post, and it will give you the option to edit the title as well. Normally, people just add [SOLVED] to the beginning of the title. 2 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