Page Template Tags

CMS template tags are used to define what content the CMS should display and where it should display it within the page template. eg. <div>{cms-page-content}</div> Special tags can optionally be placed within HTML comment tags eg. eg. <div><!--{cms-page-content}--></div> Most tags can also be used as class names (without the curly brackets); eg. <div class="cms-page-content">placeholder content</div> When used as a class name the CMS will replace any existing content in the web page element. This allows you to keep placeholder content in your page template designs that will be replaced by the CMS. Whereas using the special tag with curly brackets will insert directly into content without replacing anything. It is important that there are no broken HTML tags in template files especially when using template tags as class names. All tags names should be lower case. Some tags allow or require extra parameters which are highlighted below with [square brackets]. {cms-page-content} and {cms-page-content- [myText]} Defines where page content from the CMS will be displayed. You can also add additional content areas by appending extra text eg. {cms-page-content-1}, {cms-page-content-2}, {cms-page-content-mytext} etc. If the page is a category the selected category format file in the theme will determine how the content and any listing items are displayed on the page. {cms-page-title} The page title is usualy displayed via the {cms-page- content} tag however this tag can be used to display the title elsewhere on the page. {cms-contact-form} Defines where a contact form will be displayed. {cms-account-menu} Displays the user account menu with login and register links. {cms-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. {cms-cart-menu} Displays a summary of the customers cart contents that links to the shopping cart page. Customers can click on this to view the contents of their cart and to go through the checkout process. {cms-cart-qty} Displays number of items in the shopping cart. Put tag in a div or span with class name cms-cart-qty to refresh with add-to-cart-popup or just use class name instead of tag. {cms-cart-total} Displays total price of all items in the shopping cart (takes any discounts into account). Put tag in a div or span with class name cms-cart-total to refresh with add-to-cart-popup or just use class name instead of tag. {cms-breadcrumbs} Displays breadcrumb navigation. Text links that help the visitor navigate back to a category from a product or article page. {cms-recently-viewed} Include recently viewed items with the code below {cms-terms-content} Displays the terms and conditions as set in the admin area.

Page Links & URLs

When adding page links to templates you can use absolute URLs or the special template tags below to let the CMS automatically generate the appropriate URL. Make sure the curly brackets in the template tags are not converted to special characters. {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-category-url-[catId]} Insert the URL of the specified category. {cms-article-url-[articleId]} Insert the URL of the specified news article. {cms-product-url-[productId]} Insert the url of the specified product. {cms-login-url} Insert the url for login page. {cms-register-url} Insert the url for register new user account page. {cms-myaccount-url} Insert the url for myaccount page. {cms-cart-url} Insert the url for login page. {cms-checkout-url} Insert the url for checkout page (if cart is empty will fall back to cart page). {cms-paynow-url} Inserts URL for the paynow page (this page is shown automatically after the order confirmation page). {cms-terms-url} Inserts URL for the terms and conditions page. {cms-current-page-url} Inserts URL for the page currently being viewed. Nav Menus {cms-menu-accordian-[catId]-[effect]} display a dynamic accordian menu starting from the specified category id, set accordian effect parameter to 0 or 1 (noaacordian keep multiple sub menus expanded). Modify plugins/accordian_menu/styles.css to change menu colours and sizes. {cms-menu-treeview-[catId]} display a dynamic treeview menu starting from the specified parent category id.

Product Page Tags

If you use the {cms-page-content} tag in your template the CMS will automatically generate a product page with all the product information, images and buttons. If you need to add particular product information to parts of a template you can also use the tags below. {cms-product-id} display product id {cms-product-name} display product name {cms-product-code} display product code {cms-product-description} display product description {cms-product-price} display product price {cms-product-gallery} display product image gallery {cms-related-products} display related products Other Tags {cms-jquery} Place anywhere to instruct the CMS to replace any jquery lines in the template with the CMS's default jquery file plugins/jquery/jquery.js (use HTML comment tags if placed in the head section) {cms-jquery-selectboxes} use this tag to change normal select boxes in forms into advanced jquery select boxes {cms-inc-[myFilename]} This is an advanced tag that allows you to include a custom php file in your template where [myFilename] is the name of the file *without* the file extension. File must be a .php file. File needs to be in themes/[theme_name]/includes/ {cms-blank} This tag is simply replaced with nothing (a blank string). 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. <!--{cms-page-meta}--> Page meta code for the CMS is automatically placed at the end of the <head> section. Only use this tag if you want to position it manually. Must be used with HTML comment tags for placement in the head section.

Template Tags for Category Images

The following tags are used in conjunction with category images. The names are interchangeable so for example you could have a slider and a gallery using the same name and therefore sharing the same category images. This is useful if you have a slider on a desktop template but want to have a gallery instead on the mobile page template. {cms-slider-[mySlidername]-[catId]-[width]- [height]} To add an image slider to a page use this special tag. The image slider will pull images from the specified category id or the current one if no id is specified. {cms-image-[myImagename]-[width]-[height]- [urlOnly]} This tag can be used to allow adding and changing of images to specific places on the page template. Assign images by modifying the category and seleting the appropriate "Assign to" name. Multiple of these tags can be added with different names if needed. If urlonly is set to 1 it will output only the image url. {cms-gallery-[myGalleryname]-[catId]-[tnWidth]- [tnHeight]-[cols]} This tag can be used to display a gallery of images on the page template. The gallery will pull images from the specified category id or the current one if no id is specified. Multiple of these tags can be added with different names if needed.

CMS Help - Advanced - Themes & Templates - Template Tags