Many of the concepts we have used on the results partial, property small and elsewhere in the documentation get used on the property show page as well. The goal of the show page is to show all of the property’s photos, videos, its full description, floor plans, brochures, Energy Performance Certificates (EPC) and its location on a map (including a Street view), then channel all of this into a telephone or email lead to the agency.
Many developers employ the tabbing system so the user can toggle through the different tabs that contain a full description, floor plans, EPC graphs and so on. Active and hidden classes are applied via the core app.
Your first requirement is likely to be an output of the property’s address, or at least part of it, and its price in a title:
Next you will probably want to output the photos of the property. Many developers use jQuery type photo sliders for displaying and navigating through the photos. Thankfully, by using the photos loop, this is relatively easy to achieve:
And if you just wanted the property’s main photo:
Next we might want to output the short description for the property:
Then, to get the property’s status (Sold, Let, etc), we can use:
Email type leads are submitted to Homeflow and then on to the agent by ubiquitous web forms. Here’s a simplified version:
The form error div near the top is reserved for any lead sending errors. Once a lead is sent, a flash message
can be displayed. We have a whole array of flash notices that are used depending on the response back from the server and to display the notices, all you need to do is and the alert location div to your application.liquid
or on the subject page itself:
Homeflow supports video across all themes and we provide handy helpers to extract and embed property videos into your show page without too much fuss. Note that the video URL needs to be in an incoming property feed for this to operate.
If you just want the video URL that’s supplied in the feed, you can simply use:
As it stands this will fish out a YouTube or Vimeo like URL for you. This output can be wrapped in an if statement should you want to check it’s there before outputting.
Going a step further, if you would like to embed the video into the page, you can make use of one of our helper methods. These methods have an added benefit in that they can take non typical embed URLs like a YouTube ‘watch’ link or similar Vimeo link and turn it to an embed type link. The method below will create the iframe code for you and insert the video embed link:
If you would rather just the link, but you’d like it to be the embed style for a lightbox, use this:
The method always expects some dimensions, even though they’re not actually used for the lightbox style URL output - just add some arbitrary dimensions.
At the time of writing the similar properties function is generally used on a property show page. It takes the current property as an argument and calls a helper method called similar properties
which fetches nearby properties that are in a similar price bracket. It is a useful function to pique the user’s interest and achieve more property hits in a given session.
Similar to the featured properties seen before, if you would like to utilise the shortlist function on the similar properties output, we need to add a snippet of JavaScript to the page:
Properties can be shared on the Homeflow platform. All you have to do is include the following snippet:
This will include the default send to friend colorbox modal code. This will work out of the box if you have included the Homeflow application.js in your layout. Alternatively if you want to override or customize this form, add a partial of is your user folder called _send_to_a_friend.liquid
and add:
Here is an example using Bootstrap’s built-in CSS modal and form classes:
The next and previous property functions allow the user to cycle through a set of search results, either using the search the user performed to get to the show page, or implying the search based on the details of the property the user is on.
To get up and running, add a partial template under js_templates
called _next_prev_recent_search.liquid
In it, add and modify the following template:
Then include it in application.liquid:
Then on your property show page, wherever you want the template to render, add:
You will need to turn the supporting functionality in your theme by adding the following Ctesius config setting (as with other features).
The most recent search template lives in the same template as the next and previous property template. It is a useful function that gets the search the user carried out to get to the show page. Failing that, it will try and imply a search.
To output it to your show page, add the following div:
Printing using our core print page and stylesheet is simple to get going. Simply add a print anchor to your property show page and point its href to {{property | url_for_property}}/print
. If you need to modify the template, add a show_print.liquid
(no preceeding underscore needed) in your properties directory, then ask a member of Homeflow to drop the template in. You can also create one from scratch if you’d rather
.
Developers have complete control of the text and rendering of the notification to the user. Here’s one such example of how we accomplished it using Bootstrap modal.
Firstly on the results page and the show page, a good practice is to check the channel before outputting the modal block:
You will have noted here that we’re using a content block to manage the text of the fees popup - this makes sense, since the wording will vary from agent to agent.
For each property record on the results page and on the show page, you would add something like the following to highlight that fees apply and to let the user click to reveal the modal:
Development plots work in the same way as normal property show pages and they have access to all the same property information.
You also have access to the properties child_properties. This returns an array with any child_properties that are associated with that development. Each child has the following attributes:
Returns: The price of the property as an Integer
Returns: The property count as an Integer
Returns: The number of bathrooms as an integer
Returns: The URL path of the primary photo as a String. This will need to be appended to a MrRichard URL.
Returns: The Homeflow property_id as an Integer
Returns: The name of the type of the property as a String
You can loop through the child_properties like so: