Search result template tags
From Open-Realty Wiki
Each tag in the template system looks like this {tag_name}.
The # for the thumbnails this is the order the thumbnails appear, so 1 would display the first thumbnail image, 2 the second etc.
The # for the fields, headers and textareas is equal to the "Field Order on Search Result Page" setting in the Listing Template Editor. Keep in mind that the fields to be displayed on the Search Result template must also have "Display On Search Result Page" set to "Yes" or the field will not be displayed.
The Following tags are available from the search results templates.
| Tag | Description |
| next_prev | Inserts the Next_Prev function into the search results page. |
| search_result_header | BEGINS the Search Result header area. This area will only be displayed once on the page. This section must be closed with {/search_result_header} |
| header_title | Displays the title field name "Title" in the header area. This will be linked as a sortable field. |
| header_title_no_sort | Same as above without link. Text Only |
| header_# | Displays the Field name in the header area. This will be linked as a sortable field. The number is defined in the "Sort Order" option in the listing template editor. |
| header_#_no_sort | Same as above without link. Text Only |
| search_result_dataset | BEGINS the section for the display of the search results. This section of the template will be repeated for each search result. This section must be closed with {/search_result_dataset} |
| field_title | Displays the Title field value. |
| image_thumb_# | Displays a listing's thumbnail image. The number corresponds to the to the image order defined in the listing image editor. |
| raw_image_thumb_# | Same as image_thumb_# except it returns the image url to be used in an image tag. |
| image_full_X | Displays the specified main/full image where X = the number of the order of the main image specified in the image editor. |
| raw_image_full_X | Displays the specified main/full image NAME ONLY, where X = the number of the order of the main image specified in the image editor. |
| image_full_fullurl_X | Displays the specified main/full image URL ONLY, where X = the number of the order of the main image specified in the image editor. |
| field_# | Displays the Data from the specified field number. The number is defined in the "Sort Order" option in the listing template editor. |
| textarea_# | Displays entire field value from a Text Area |
| textarea_#_short | Displays first 100 characters from a Text Area then displays "... More Info" which is linked to the listing view. |
| delete_from_favorite | Displays the option to delete a listing from a user's saved favorites. Option will only be displayed when in favorites. |
| vtour_button | Displays the Virtual Tour link button on the search results for each listing that has a virtual tour. NOTE: in OR 2.5 and earlier this tag is called with {vtour_link} and was changed in order to be identical to the tag that is called from the listing detail page. |
| link_to_listing | Allows you to create a link to the listing on the Search Results page. For Example: <a href="{link_to_listing}">Click here for listing details</a> |
| listing_pclass | Displays the name of the property class the listing is assigned to. In cases where the listing is part of multiple classes it will show a the names separated by a comma. |
| listingid | Displays the Listing ID on the search results page. |
| listing_field_FIELDNAME | by using the name of a listing field defined in the listing template editor, you can call the individual field and place it on the page. For example to call the "address" field you would insert {listing_field_address} into your template, which would result in both the field caption and value being placed in your template, eg. "Address: 1600 Penn Ave." |
| listing_field_FIELDNAME_value | Works the same listing_field_FIELDNAME, except you only get the field value. eg. "1600 Penn Ave." |
| listing_field_FIELDNAME_caption | Works the same listing_field_FIELDNAME, except you only get the field caption. eg. "Address" |
| listing_field_FIELDNAME_rawvalue | Works the same listing_field_FIELDNAME, except you only get the raw field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_last_name | Displays the listing agent's last name. |
| listing_agent_first_name | Displays the listing agent's first name. |
| listing_agent_thumbnail_# | Displays the listing agent's thumbnail image that is specfied in the # place. Whatever number is specified will display the thumbnail that falls in that order |
| listing_agent_field_FIELDNAME | by using the name of a user field defined in the user template editor, you can call the individual field and place it on the page. For example to call the "phone" field you would insert {listing_agent_field_phone} into your template, which would result in both the field caption and value being placed in your template, eg. "Phone: 555-1234" |
| listing_agent_field_FIELDNAME_value | Works the same listing_agent_field_FIELDNAME, except you only get the field value. eg. "555-1234" |
| listing_agent_field_FIELDNAME_rawvalue | Works the same listing_agent_field_FIELDNAME, except you only get the raw, unformatted field value. For example when calling the price field instead of getting "$150,000" you would simply get "150000". |
| listing_agent_field_FIELDNAME_caption | Works the same listing_agent_field_FIELDNAME, except you only get the field caption. eg. "Phone" |
| fulllink_to_listing | The absolute link to the listing instead of the relative. Used for RSS Newsfeeds. |
| link_edit_listing | This places a link to edit the listing on the search results page for each listing if the agent is logged in and is the owner of the listing, or if the logged in agent is an admin or has permissions to edit all listings. |
| link_edit_listing_url | This provides the raw html address to the edit listing page on the search results page for each listing if the agent is logged in and is the owner of the listing, or if the logged in agent is an admin or has permissions to edit all listings. |
| get_creation_date | Displays the listing's creation date in the configured Open-Realty date format. |
| get_modified_date | Displays the listing's creation date in the configured Open-Realty date format. |
| get_featured | Adds "featured" to listing details or search results if listing is featured otherwise does nothing. Useful for CSS templating purposes or just letting people know this is a featured listing. |
| get_featured_raw | Adds "yes" or "no" to the template depending on if the listing is featured or not. Primarily used in CSS for templating purposes. |
| money_sign | Adds the configured money sign to the template. |
| Blocks | |
| TEMPLATE_TAG_block | BEGINS a block for the defined template tag. All code contained on the template inside this block will not be displayed if there is no matching field. This is for template designers who do not know the number of fields the site admin will have marked as searchable. It does not hide the data if the field exist but is empty. Block must be closed with {/TEMPLATE_TAG_block} The following template tags have block options:
header_title; header_title_no_sort; header_#; header_#_no_sort; field_title; field_#; textarea_#; textarea_#_short |
| Other/Miscellanous | |
| row_num_even_odd | Gets the row number and returns it as 0 or 1. This is used, in combination with the stylesheet to alternate table row colors. Proper usage of this tag in your template would be: <tr class="result_row_{row_num_even_odd}"> |
