Flags

Overview

Flags allow you to show the status of a property on search results and details pages by adding a little sash over the thumbnail. For example:

Enabling flags

Under 'Property Hive > Settings > Template Assistant > Flags' you'll have the ability to choose if you want the flags to appear on the search results page and/or the property details page.

You can also specify the background colour and text colour used:

The output HTML/CSS

The HTML output looks like so:

<div class="flag flag-for-sale" style="position:absolute; text-transform:uppercase; font-size:13px; box-sizing:border-box; padding:7px 20px; top:0; right:0;; color:#FFF; background:#bf2b2b;">For Sale</div>

As you can see the element gets a class of flag-{availability}.

This means that if you want to only show a flag for non-for sale properties you could add something like so

.flag.flag-for-sale,
.flag.flag-to-let { display:none }

Or you could give different availability flags different colours:

.flag.flag-for-sale { background:green !important; }
.flag.flag-sold-stc { background:red !important; }

Hooks

When enabled, the functionality hooks into the propertyhive_before_search_results_loop_item_title hook for search results and propertyhive_before_single_property_images for the single property page.