Jump to content

entry details page


noussh
 Share

Recommended Posts

Hi everyone!

I am very new to processwire.

I have properties listed on a page.  When I click on a particular property, it should take me to a single page where it show all the details.

For example. :

properties/ 

(shows all properties, i got this right.)

properties/al-bateen-residences/

(shows  al-bateen-residence detaisl)

<?php $properties = $pages->find('template=properties'); ?>
<?php foreach($properties as $property): ?>
    <div> <a href="<?=$property->url;?>"> <?=$property->title;?> </a> </div>
<?php endforeach; ?>

Thanks.  noussh

Link to comment
Share on other sites

You should echo your properties. I would code it like this:

<?php 

$properties = $pages->find("template=properties"); 
foreach ($properties as $property) 
{
	echo "<div><a href='{$property->url}'>{$property->title}</a></div>";	
}
Link to comment
Share on other sites

The links you generated with <a href="<?=$property->url;?>"> don't go there? Where do they go then? Does the template "properties" have a php file associated with it? That's where you would echo the details using something like echo $page->myDetail;.

  • Like 2
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...