OS Property support center

Making Property Title a Hyperlink

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #56646 by William Heafner
Making Property Title a Hyperlink was created by William Heafner
I would like to be able to make the property title a hyperlink for the agent’s/owners website. I noticed when entering in a new agent/owner there is an option for website but, there seems to be nowhere to display this link. It would be great if I could edit some code to make the title tag pull the web address from this filed and create a link for each property title. Is this possible? I do not mind editing the code myself.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #56694 by Mr. Dam
Replied by Mr. Dam on topic Making Property Title a Hyperlink
Hi William,
Sorry, i don't understand your idea. "property title" link will be the link of website of agent?
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #56700 by William Heafner
Replied by William Heafner on topic Making Property Title a Hyperlink

If you look at the image I would like to have Rugby Creek Cabins & Equestrian Retreat a link to the customers website or at least have the web address below agent name
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #56724 by Mr. Dam
Replied by Mr. Dam on topic Making Property Title a Hyperlink
Hi,
Agent doesn't have field called Website as you said
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #56753 by William Heafner
Replied by William Heafner on topic Making Property Title a Hyperlink
My mistake companies has the field for website which should make it possible to accomplish this address on the details page front-end.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #56785 by Mr. Dam
Replied by Mr. Dam on topic Making Property Title a Hyperlink
Hi William,
You can follow these steps to add the link of company website into the property title in property detais page.
1 open file
components > com_osproperty > templates > theme3 > details.html.tpl.php
find
<?php
if($row->ref != ""){
?>
<font color="orange">
<?php echo $row->ref?>
</font>
-
<?php
}
?>
<?php echo $row->pro_name?>

and change to

<?php
$db->setQuery("Select a.* from #__osrs_companies as a inner join #__osrs_agents as b on b.company_id = a.id where b.id = '$row->agent_id'");
$company = $db->loadObject();
if($company->website != ""){
?>
<a href="<?php echo $company->website; ?>" target="_blank">
<?php
}
if($row->ref != ""){
?>
<font color="orange">
<?php echo $row->ref?>
</font>
-
<?php
}
?>
<?php echo $row->pro_name?>
<?php
if($company->website != ""){
?>
</a>
<?php } ?>

Good luck
Dam

Please Log in or Create an account to join the conversation.

  • William Heafner
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #57257 by William Heafner
Replied by William Heafner on topic Making Property Title a Hyperlink
Hi Dam, when I make these changes the details page is blank any suggestions?

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #57269 by Mr. Dam
Replied by Mr. Dam on topic Making Property Title a Hyperlink
Hi,
You did something wrong so it has that error. Please submit ticket and send your site information with super admin acc. I will check and solve it for you
Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan