1. Home
  2. Docs
  3. Add-Ons
  4. Property Portal
  5. Outputting Agent Details On a Property

Outputting Agent Details On a Property

When a property is assigned to an agent/branch it's likely that you'll want to display the logo, name and contact details of the agent in question on search results or the property details page.

There are a number of properties/methods available. As long as you have the $property global variable available in your template or action you should have access to all of the agent information you need. You can see below an example of how we might get various bits of information:

$property_agent_branch = new PH_Property_Agent_Branch($property);
var_dump($property_agent_branch->agent->post_title);
var_dump($property_agent_branch->agent->get_logo_src());
var_dump($property_agent_branch->agent_branch->get_formatted_full_address());
var_dump($property_agent_branch->get_agent_branch_telephone_number());
var_dump($property_agent_branch->get_agent_branch_email_address());