Jump to content

[SOLVED] $page->field->title doesn't want to


BFD Calendar
 Share

Recommended Posts

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

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...
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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