$pageType

You can use the $pageType variable throughout most of the Aurora Front-end to determine the main area of the site you are on.

This article provides some examples of its use and values to clarify its purpose.

Example of use

This can be used in your code to determine the main area of the site you are on and so tailor your content, or perhaps tracking in the header and footer templates, as shown below:

{if in_array("members", $pageType)}
  {assign var='dynamic_css_template' value='reviews,members'}
  {assign var='dynamic_js_template' value='r:members'}
{elseif in_array("blog", $pageType)}
  {assign var='dynamic_css_template' value='blog,paging'}
  {assign var='dynamic_js_template' value='r:social'}
{/if}

You can also call it directly using:

$pageType.0

Example values

The following are allowed values:

  • 404
  • basket
  • blog
  • checkout
  • content
  • home
  • members
  • productdetails
  • productlist

Smarty if_page_type block

You may also use the following smarty block to show content based on page type.