Usage: {tag_name}.


The following tags are available for use within the following main template files:

main.html

popup.html

blank.html

printer_friendly.html

page#_main.html

searchresults_main.html

maintenance_mode.html

Tag

Description

addthis_button

Places an "AddThis" button on your site where the template tag is specified. AddThis supports 150+ services such as Digg, Stumbleupon, Facebook, MySpace, Twitter and 100's of other services. This loads external javascript from the AddThis site to function.

templated_search_form

This renders the templated search form onto your main template page or within a Blog or Page editor page.

templated_search_form_XX

Renders a listing search form (as above) but for for a specific property class where XX is the numeric Property class ID# (pclass_id).

e.g.:

{templated_search_form_1} <- Renders a search form for property class ID#1 (Home)

baseurl

Renders the base URL where Open-Realty is installed, i.e. the root of your Open-Realty site.

e.g.

http://www.mywebsite.com

or, if installed in a folder:

http://www.mywebsite.com/foldername

curley_open

Renders an opening curly brace character {. Useful if you need to display actual curly braces and not have them interpreted by the template engine as template tag boundaries.

curley_close

Renders a closing curly brace character }. Useful if you need to display actual curly braces and not have them interpreted by the template engine as template tag boundaries.

url_index

Places the URL for the Index Page into the template.

url_search

Places the URL to the Search Page into the template.

url_search_class_#

Places the URL to the search page for the specficed numeric property class ID into the template.

url_search_results

Places the URL to the Search Results page into the template. This will be to display ALL listings

url_searchresults_class_#

Places the URL to the search results page for property class # into the template.

url_view_agents

Places the URL to view the agent's into the template.

url_view_calculator

Places the URL to view the calculator into the template.

url_view_favorites

Places the URL to View a member's Favorite listings. This should be used inside of the check member permission tags.

url_view_saved_searches

Places the URL to view a member's Saved Searches. This should be used inside of the check member permission tags.

url_logout

Places the URL for a member to LOGOUT of the site. This should be used inside of the check member permission tags.

url_member_signup

Places the URL for a visitor to sign up as a member to the site. This should be used inside of the check guest permission tags.

url_member_login

Places the URL for a visitor to LOGIN to the site as a member. This should be used inside of the check guest permission tags.

url_agent_signup

Places the URL for a visitor to sign up as an agent on the site. This should be used inside of the check guest permission tags.

url_agent_login

Places the URL for an agent to LOGIN to the site as an agent. This should be used inside of the check guest permission tags.

url_blog

Places the URL for the Blog Index on the site. The blog index displays a list of all the blog posts

page_link_#

Places a link to the specified page # into the template. The page number is provided when editing a page with the Page Editor.

blog_link_#

Places a link to the specified blog post # into the template. The blog post # is provided when editing a blog post in the Blog Manager.

featured_listings_vertical

Inserts the featured listings in a vertical layout.

featured_listings_horizontal

Inserts the featured listings in a horizontal layout.

random_listings_vertical

Inserts random listings in a vertical layout.

random_listings_horizontal

Inserts random listings in a horizontal layout.

latest_listings_vertical

Inserts the latest listings in a vertical layout.

latest_listings_horizontal

Inserts the latest listings in a horizontal layout.

popular_listings_vertical

Inserts the popular(most viewed) listings in a vertical layout.

popular_listings_horizontal

Inserts the popular(most viewed) listings in a horizontal layout.

featured_listings_vertical_class_#

Inserts the featured listings for property class # in a vertical layout.

featured_listings_horizontal_class_#

Inserts the featured listings for property class # in a horizontal layout.

random_listings_vertical_class_#

Inserts random listings for property class # in a vertical layout.

random_listings_horizontal_class_#

Inserts random listings for property class # in a horizontal layout.

latest_listings_vertical_class_#

Inserts the latest listings for property class # in a vertical layout.

latest_listings_horizontal_class_#

Inserts the latest listings for property class # in a horizontal layout.

popular_listings_vertical_class_#

Inserts the popular(most viewed) listings for property class # in a vertical layout.

popular_listings_horizontal_class_#

Inserts the popular(most viewed) listings for property class # in a horizontal layout.

load_js

*deprecated as of OR v3.12.10*

Places JavaScript into the template. This loads javascript defined using the $load_js variable and can be used throughout Open-Realty® and Add-ons. This should be placed near the top of your main template between the <head> and </head> tags.

load_ORjs

Places OR dependency and add-on JavaScript into the template. This loads javascript defined using the $load_js variable and can be used throughout Open-Realty® and properly crafted add-ons. This should be placed near the top of your main template between the <head> and </head> tags. REPLACES {load_js} as of OR v3.2.10

load_js_last

Places JavaScript into the template. This loads javascript defined using the $load_js_last variable and can be used throughout Open-Realty and its add-ons. This should be placed at the end of your main.html template file just before the </body> tag.

load_meta_keywords

This places the meta keywords tag and values into your template. The Meta keywords help with search engine ranking. This tag should be placed inside the head tag of your main.html template.

load_meta_description

This places the meta description tag and values into your template. The Meta description helps with search engine ranking. This tag should be placed inside the head tag of your main.html template.

load_meta_keywords_raw

This places the raw meta keywords values into your template. The Meta keywords help with search engine ranking. This tag should be placed inside the head tag of your main.html template. Proper usage of this tag would be within the meta keywords tag for example:

<meta name="keywords"content="{load_meta_keywords_raw}"/>

load_meta_description_raw

This places the raw meta description values into your template. The Meta description helps with search engine ranking. This tag should be placed inside the head tag of your main.html template. Proper usage of this tag would be within the meta description tag for example:

<meta name="description"content="{load_meta_description_raw}"/>

template_url

Places the currently selected template url into the template. Very useful for creating absolute  URLs for loading images, CSS and JS files from within your template folder.

e.g.: assumes Lazuli template is set:

<img src="{template_url}/images/photo.jpg"/>

Returns:

<img src="http://www.mysite.com/template/lazuli/images/photo.jpg"/>


content

Renders the page content generated by Open-Realty into the template.

site_title

Places the site title set via Open-Realty's Site Config.

company_name

Displays the company name set in the Open-Realty Site Configuration.

company_location

Renders the company location set via Site Config.

company_logo

Renders the URL for the company logo set via Site Config.

lang_VARIABLENAME

Places the specified language variable from your language file(s) into the template. For example using {lang_featured_listings} would render the contents of the language variable: $lang['featured_listings'] which is in this case: "Featured Listings"

load_css_FILENAME

Places a link to load your CSS file(s) into your template. The CSS file must be located in your presently selected template directory alongside  'main.html' and it must have a .css extension. This tag should be placed inside your template's HTML  <head></head> tags.

Example: For loading the CSS file: 'mycss.css'  use: {load_css_mycss)

note: You do not include the .css extension in the tag, it is implied.

CSS files loaded via this method may contain {basepath} and {baseurl} template tags.which will be parsed and rendered as usual.

charset

Adds the charset selected in site config to your template. This tag should be placed inside your template's HTML <head> </head> tags.

template_select

Displays the template selection dropdown box.

rss_featured

Generates a URL to the Featured Listings RSS feed. URL will be generated as SEF if SEO is enabled in Site Config

rss_lastmodified

Generates a URL to the Last Modified Listings RSS feed. URL will be generated as SEF if SEO is enabled in Site Config.

link_calc

Places a link to the calculators.

active_listing_count

Displays the total number of active listings for all classes

active_listing_count_pclass_X

Displays the total number of active listings for the single property class where X is the class ID

Example for 'Home':

(active_listing_count_pclass_1}

link_calc_url

This provides the raw html address for the calculators. This can be used to create your own link to the calculators using HTML.

example:

<a href="{link_calc_url}">Calculator Link</a>

(The raw html address does not contain ANY popup, size or other code found in the normal link tag)

listing_stat_FUNCTION_field_FIELDNAME_value

Calculates and displays statistical information for any numeric field for all listings that contain that field. Requires 2 variables: FUNCTION and FIELDNAME. FUNCTION must be one of the following:

average

min  (lowest value)

max (highest value)

median

example for average price:

{listing_stat_average_field_price_value}

listing_stat_FUNCTION_field_FIELDNAME_value_pclass_X

Same as {listing_stat_FUNCTION_field_FIELDNAME_value} above, but the results are restricted to the property class defined. X =  the numeric property class ID you wish to return results.

example for average price for the 'Home' property class :

{listing_stat_average_field_price_value_pclass_1}

mobile_full_template_link

Provides a link for switching between the mobile or regular public template. This will link to the opposite  template that the user is currently viewing, e.g: if a visitor is viewing the mobile version of the site, this will link to the full site and vice-versa.


getvar_XXX

Obtains and renders the value of a specific $_GET variable (if present) where XXX denotes the $_GET variable to query.


example for use with a search results template to obtain the value of the"city" $_GET variable used in the URL:

URL of search results page:

http://www.yoursite.com/index.php?action=searchresults&city=scranton&pclass[]=1


Template tag: {getvar_city} displays the text: scranton


If the $_GET variable is an array, (such as pclass[]) only the first value of the array will be returned;

http://www.yoursite.com/index.php?action=searchresults&city=scranton&pclass[]=1&pclass[]=4


Template tag: {getvar_pclass} displays: 1, the first value in the pclass array


Block

All code contained on the template inside a block will be controlled according to the block it is contained inside. This is for template designers to control the display of many fields or code by enclosing it in one simple template tag block. A STARTING block will look like a normal template tag but that block must be closed with {/TEMPLATE_TAG} The following template tags are blocks:

pclass_names_ul

Creates an HTML unordered list <ul> that contains the names of each property class.

pclass_names_searchlinks

Creates an HTML unordered list <ul> that contains the links to to the search page and the names for each property class.

listings_custom_search_result_block

Allows you to perform a search and return listings based on your criteria to main.html and any Blog or Page Editor page.

The {listings_custom_search_result_block}  tag allows you to pass the following options:


$limit - The max number of listings to display. If left empty this defaults to 10. 0= no limit


$args - Search options you want to pass. This should be a string of search parameters.

       example: To retrieve featured listings you would use:

               $args="featured=yes"

       example2: To retrieve featured listings from only the city of Scranton you would use:

               $args="featured=yes&city=Scranton"


$sortby - Fields (comma seperated list) to sort the search results by. If left empty this defaults

       to sort the results randomly.

       example: To sort the listings by the number of beds and then by price do:

               $sort="beds,price"


$sorttype - Direction to sort the listings. This should be a comma separated list of equal

       length as the $sortby paramater.

       example: $sorttype="DESC,ASC"


Example that will return 10 random listings

{listings_custom_search_result_block}

<h4>{listing_title}</h4>

<a href="{fulllink_to_listing}"><img src="{raw_image_thumb_1}"></a>

<br/>

  {listing_field_price_caption}: {listing_field_price_value}

{/listings_custom_search_result_block}

       

Example that uses options and will return 5 featured listings from the city of 'Scranton', sorted by price

{listings_custom_search_result_block $limit="5" $args="featuredOnly=yes&city=Scranton" $sortby="price" $sorttype="DESC"}

<h4>{listing_title}</h4>

<a href="{fulllink_to_listing}"><img src="{raw_image_thumb_1}"></a>

<br/>

  {listing_field_price_caption}: {listing_field_price_value}

{/listings_custom_search_result_block}

custom_search_has_result

Refinement for the {listings_custom_search_result_block} tag above. Only the text or tags that are within this block will be repeated for each listing, and only if there is a valid result to the search. Useful for excluding items from iteration.

Example:

{listings_custom_search_result_block $limit="5" $args="featuredOnly=yes"}

<h1>Featured Listings</h1><!-- This line displayed only once -->

  {custom_search_has_result}

<h4>{listing_title}</h4>

<ahref="{fulllink_to_listing}"><img src="{raw_image_thumb_1}"></a>

<br/>

    {listing_field_price_caption}: {listing_field_price_value}

  {/custom_search_has_result}

{/listings_custom_search_result_block}

foreach_pclass_block

Content placed within {foreach_pclass_block} {/foreach_pclass_block} will be repeated (iterated) once for each property class. Especially useful template tags for use within this block are:

{pclass_id}

{pclass_name}

Any tag that requires a property class ID can be used effectively.

This block tag can be useful for creating tabbed or other navigation content that uses unordered lists <ul> or nested <div>s.


Example for creating a tabbed navigation section using j.

<!-- the tabs -->

<ulclass="tabs">

  {foreach_pclass_block}

<li><a href="#" id="tab_{pclass_id}">{pclass_name}</a></li>

  {/foreach_pclass_block}

</ul>


<!-- tab "panes" -->

<div class="panes">

  {foreach_pclass_block}        

<divid="pane_data_{pclass_id}">

      This content is for class: {pclass_name}

</div>

  {/foreach_pclass_block}

</div>

               

<script type="text/javascript">

  $(document).ready(function() {

    $("ul.tabs").tabs("div.panes > div");

  });

</script>

agents_custom_search_result_block

Content placed within {agents_custom_search_result_block} {/agents_custom_search_result_block} tags will be repeated (iterated) once for each active Agent in OR, sorted by their defined Agent Order (rank) unless otherwise specified. The Admin user (user ID#1) is a special case and will only be present in the results if "Show Admin on Agent list" is set to 'yes' in Site Config.


example for creating a select form element of all Active Agents

<select class="myclass" name="selectname">

 {agents_custom_search_result_block $args="userdb_is_agent=yes&userdb_active=yes" $sortby="userdb_rank" $sorttype="ASC" $limit="0"}

   <option value="{user_id}">{user_first_name} {user_last_name}</option>

 {/agents_custom_search_result_block}

</select>


The following Agent data template tags are supported.:

agent_id - user ID#

agent_first_name - The Agent's First Name

agent_last_name - The Agent's Last Name

agent_email - The Agent's email address

agent_link - Text URL of the Agent's detail page

agent_contact_link - Clickable link to the Agent's Contact form

agent_qr_code_link - Text URL linking to the Agent's qrcode image

agent_field_FIELDNAME_caption - Renders the field Caption  of the Agent field denoted by FIELDNAME

agent_field_FIELDNAME_value - Renders the field value of the Agent field denoted by FIELDNAME

agent_field_FIELDNAME_rawvalue - Renders the raw field value of the Agent field denoted by FIELDNAME


The following Agent photo template tags are supported:

(# below denotes the numeric order of the photo, 1 = first, 2=second e.g. {agent_image_full_1} )

agent_image_full_# - Full size photo of the Agent rendered as an HTML <img>

raw_agent_image_full_# - Text URL of the full size photo.

agent_image_thumb_# - Thumbnail photo of the Agent rendered as an HTML <img>

raw_agent_image_thumb_# - Text URL of the thumbnail photo.

blog_custom_search_result_block

Content placed within {blog_custom_search_result_block} {/blog_custom_search_result_block} tags will be repeated (iterated) once for each Blog Article using the sorting and etc you specify.


example for creating a select form element of status: live blogs belonging to Agent ID #4, sorted by date

<select class="myclass" name="selectname">

 {blog_custom_search_result_block $args="blogmain_published=1&userdb_id=4" $sortby="blogmain_date" $sorttype="DESC" $limit="0"}

   <option value="{blog_id}">{blog_title}</option>

 {/blog_custom_search_result_block}

</select>


The following Blog template tags are supported.:

blog_id - The unique Blog article ID#

blog_title - The Blog article Title

blog_author - The Blog's article's Author

blog_date_posted - The date the Article was posted

blog_comment_count - The number of comments on the article

blog_url - Clickable link to the Blog article

blog_summary - Renders a summary of the Blog article

blog_full_article - Renders the full Blog article contents.

blog_post_tags - Renders an unordered list of one or more links to each assigned Blog tag. The <ul> container has a class of: btags, each <a>nchor tag contains a unique id equal to: btag__+ the tag_id (e.g.: btag_42) and is additionally assigned a class of: btags_link


<ul class="btags">

 <li><a id="btag_42" class="btags_link"  href="#">TAGNAME</a></li>

</ul>


if_addon_XX

Displays content stored within this block is a specific addon (denoted by XX) is installed.

e.g.:

{if_addon_transparentmaps}

   Display this content if TMAPS is installed

{/if_addon_transparentmaps}

Related Topics:
Listings Notification
Editing Listings
Blog Publisher (Editor View)
Place Listing Information in your Blog Post
Search Page Options
Search Result Options
Search Page Order Tab
Search Results Order Tab
Creating a public site Template
TEMPLATE SYSTEM LOGIC
MAIN TEMPLATES
Blog Template Tags
FEATURED/RANDOM LISTINGS TEMPLATES
Featured/Random Template Tags
SEARCH PAGE TEMPLATES
Custom Search Pages
Date and Time related searches
Multiple Sortby Values
Additional Search String Variables
Search Page Template Tags
Search Results Template Tags
Search Results
Single Use Hooks
Developer Notes/Tips
FREQUENTLY ASKED QUESTIONS (FAQs)
TROUBLESHOOTING