Usage: {tag_name}


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

main.html


Tag

Description



addon_links

REQUIRED: This tag parses all of your add-ons, triggers the installation functions and displays the admin icons from the add-on. If you remove this tag, add-on installation functions can not be triggered and add-ons may not work properly.

select_language

Shows the language selection drop down.

version

Shows "Version: 3.x.X". Retrieves the currently installed version number and uses the $lang['version'] variable to show the word: "Version" in the correct language.

lang_index_home

Shows the word "Home" from $lang['index_home'] variable.

lang_index_admin

Shows the word "Admin" from $lang['index_admin'] variable.

lang_index_logout

Shows the word "Logout" from $lang['index_logout'] variable.

baseurl

Places the correct baseurl into the template.

template_url

Places the correct admin template url into the template.

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 via the $load_ORjs global variable and can be used throughout Open-Realty® and add-ons. This should be placed somewhere within 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 Add-ons. This should be placed at the end of your main template just before the </body> tag.

content

This places the actual content generated by Open-Realty from specific GET['action'] calls.

current_user_id

Renders the userdb_id (User ID#) of the presently logged-in user.

current_user_first_name

Renders the First Name of the presently logged-in user.

current_user_last_name

Renders the Last Name of the presently logged-in user.

site_title

This places the site title set in the Open-Realty site configuration.

company_name

This places the company name from the site configuration onto the page.

company_location

This places the company location from the site configuration onto the page.

company_logo

This places the url for the company logo from the site configuration onto the page.

openrealty_links

Places links to Open-Realty related resources

general_info

Places a general info block on the admin page providing details about your Open-Realty installation.

charset

Adds the charset selected in site config to your template.

user_id

Displays the current user ID

active_listing_count

Displays the total number of active listings for all classes

active_listing_count_pclass_#

Displays the total number of active listings for the single property class where # equals  the class ID

Example for 'Home':

(active_listing_count_pclass_1}

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_#

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

example for average price for the 'Home' (class_id =1) property class:

{listing_stat_average_field_price_value_pclass_1}


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:

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 -->

<ul class="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>