Property name - hyperlink

Everything related to your website and the Beds24 widgets
Post Reply
sistachrentals
Posts: 24
Joined: Sat Nov 04, 2017 12:08 pm
Contact:

Property name - hyperlink

Post by sistachrentals » Wed Dec 06, 2017 10:10 am

I was wondering if there is any way to make the property name clickable? On the agency page, the only clickable part in order to view the property is the button, it would be great if the property name and/or image slider could be clickable too. Could this be achieved with javascript?

sistachrentals
Posts: 24
Joined: Sat Nov 04, 2017 12:08 pm
Contact:

Re: Property name - hyperlink

Post by sistachrentals » Wed Dec 06, 2017 10:38 am

I tried this in Multiple Properties > Advanced HTML settings, but it didn't do what I wanted it to do :) I have no clue about javascript though.

<script type="text/javascript"
$(".b24panel-prop").click(function() {
window.location = $(this).find("a").attr("href");
return false;
});
</script>

markkinchin
Site Admin
Posts: 896
Joined: Fri Mar 02, 2012 1:43 pm

Re: Property name - hyperlink

Post by markkinchin » Wed Dec 06, 2017 2:37 pm

I am not sure if the script will do what you want, but it is missing a closing tag, it should be like this

<script type="text/javascript">
$(".b24panel-prop").click(function() {
window.location = $(this).find("a").attr("href");
return false;
});
</script>

sistachrentals
Posts: 24
Joined: Sat Nov 04, 2017 12:08 pm
Contact:

Re: Property name - hyperlink

Post by sistachrentals » Thu Dec 07, 2017 11:33 am

Thanks, can't make that to work though. I thought of adding a hyperlink directly to each Property Name, for example entering a hyperlink in the property name field:
<a href="/booking2.php?ownerid=xxxxx&propid=xxxxx/">Apartment XX</a>

which does make the property name clickable on almost every page, EXCEPT on the booking page where it should say
Apartment XX requieres a payment of 120€
but instead it says:
<a href="/booking2.php?ownerid=xxxxx&propid=xxxxx/">Apartment XX</a> requieres a payment of 120€

Since I can't hide this property name on the booking page without also hiding the amount (120€), I can't use this.
It would be great if someone had a better idea how to make the property name clickable.

sistachrentals
Posts: 24
Joined: Sat Nov 04, 2017 12:08 pm
Contact:

Re: Property name - hyperlink

Post by sistachrentals » Thu Dec 07, 2017 12:15 pm

Alright here we go :) I found a CSS solution on stackoverflow. I am posting it in case someone else would like to use it:

This is to expand the button clickable area without increasing the actual size of the button, on the Multiple Properties (agency) page:

Desktop view:

.at_bookingbut a {
position:relative;
z-index:50;
}

.at_bookingbut a:before{
position:absolute;
content:'';
top:-60px;
right:-20px;
left:-1030px;
bottom:-190px;
z-index:40;
outline:1px solid red; /* this is just so you can see and size the area correctly, after you specify the size, it should be deleted*/
}

Mobile view:
@media only screen and (max-width: 768px) {
.at_bookingbut a:before{
position:absolute;
content:'';
top:-70px;
right:-100px;
left:-100px;
bottom:-250px;
z-index:40;
outline:1px solid red; /* this is just so you can see and size the area correctly, after you specify the size, it should be deleted*/
}
}

sistachrentals
Posts: 24
Joined: Sat Nov 04, 2017 12:08 pm
Contact:

Re: Property name - hyperlink

Post by sistachrentals » Thu May 03, 2018 12:45 pm

I believe there have been changes in the code, so in order to achieve the same result, .at_bookingbut should be exchanged by .propfromprice

Post Reply