Jump to content

Recommended Posts

Posted

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.

Posted
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.

Posted (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 by dragan
too hot to ponder about code...
Posted

@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?

Posted

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.

  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...