Page Template Tags

The following tags and functions can be used by a web designer when creating page templates. {page_content} Displays the main page content eg. categories, products, cart, checkout etc. Put this code in the <body> section of your page. You can also have additional content areas using {page_content_x} where x is whatever you want to name the content area. {page_meta} If this tag is not present in your page template then any meta code that the cms generates such as stylesheets and javascript code will be included automatically at the end of the <head> section. If you want to position this manually though you can include this special tag somewhere in the <head> section of your page template. {account_menu} Displays the user account menu with login and register links. {cart_menu} Displays a summary of the customers cart contents that links to the shopping cart page. Your customers can click on this to view the contents of their cart and to go through the checkout process. {search} Displays a search box that can be used to search either products or news articles depending on the Listings Format setting for the search results category (system category 4). The cms compares searches to product/article names and the meta keywords. {breadcrumbs} Displays breadcrumb navigation. Text links that help the visitor navigate back to a category from a product or article page. {recently_viewed} Include recently viewed items with the code below {terms} Displays the terms and conditions as set in the cms admin area {cms_url} Use this to insert the absolute url to the cms main index.php in your code eg. http://www.mysite.com/ {cms_root_url} Use this to insert the absolute url to the cms root directory in your code eg. http://www.mysite.com/cms/ {cms_theme_url} Use this to insert the absolute url to the active theme directory. For example you could use {theme_url}styles/mystylesheet.css to link to a style sheet in your theme/styles folder eg. http://www.mysite.com/cms/themes/mytheme/ {cms_link_cat,0} Use this to insert an url to the specified category, replace 0 with category id. Of course you can also use actual urls to categories in your page templates. {cms_link_news,0} Use this to insert an url to the specified news article, replace 0 with article id. Of course you can also use actual urls to articles in your page templates. {cms_link_product,0} Use this to insert an url to the specified product, replace 0 with product id. Of course you can also use actual urls to products in your page templates. {menu_accordian,0,0} display a dynamic accordian menu, replace first 0 if needed with a parent category id, change second 0 to 1 to change accordian effect (noaacordian keep multiple sub menus expanded) {menu_treeview,0} display a dynamic treeview menu, replace first 0 if needed with a parent category id {jquery_selectboxes} use this tag to change normal select boxes in forms into advanced jquery select boxes {inc_my_include_file.php} Include a custom php file in your template where "my_include_file.php" is the name of the file, the file needs to be in themes/theme_name/includes/ {blank} This tag is simply replaced with nothing "". For example you can put this at the start of a url in a src value to make sure the update template process doesn’t change it.

PHP Functions

The following php functions can be used on your page templates. These are really only for use in special case scenarios.

Displaying a Category

The cms handles outputting of categoies automatically however there might be situations where you want to force output of category in a particular way. Categories are used to display listings which can be products, news items or user listings. A category can also be used for a standard webpage without listings. You can display a category and it's listings on any webpage by using the code below. $category_details=get_category_details($category_id); // override settings - optional // You can override category settings here, for example... $category_details['heading_visible']=0; // hide/show heading 0/1 $category_details['display_format']='products_default'; // use a different display format for listings $category_details['cols']=3; // set the number of columns $category_details['rows']=4; // set the number of rows $category_details['tnx']=100; // set the width of thumbnail images $category_details['tny']=100; // set the height of thumnail images; // override settings end // output on the page $output=display_category($category_details,$page_number,$sea rch,$specific_items); echo $output['content']['main']; $category_id = the id of the category that you want to display $page_number = display a categories sub page $search = null or an array containing search keys and values special reserved search keys listed below. Specifying custom search keys will use exact match/case insensitive, end a search key with "_lax" for a non exact search/contains search value eg. search[location_lax]=rela will match ireland. To omit from the search process append omit_ eg. search[omit_this] or leave the value blank eg. search[this]="" 'phrase' = search items using a general search phrase, typically for searching item ids, name, keywords - specify negative keywords with a preceding hyphen eg -keyword or perform an exact match with square brackets eg. [exact keyphrase] 'price' = display only items within a specified price range eg. 0,200 for 0 to 200 - or enter a single price to display listings greater or equal to the specified price $specific_items = provide an array of item ids to display specific items regardless of category or search Display Categories as Image Table Use the php function below to display category images in a table. Each category specified will be outputted as an image that links through to the category itself. This is essentially a navigation aid. display_category_image_table($category_ids,$cols,$tnx,$tny); $category_ids - an array of category ids $cols - the number of table columns $tnx - thumbnail width $tny - thumbnail height

CMS Help - Advanced - Themes & Page Templates - Template Tags