Content Templates

Aurora Content (Pages) refers to a particular type of content in Aurora, which allows you to create entire pages for accessing on the Front-end of your Store on any configured URL. The templates for these allow you to present these pages in any way you see fit.

This article describes how to manage the templates for the Content Pages on your Store to get maximum flexibility while creating your Store's pages.

👍

This article specifically deals with managing the templates used to surround your Content Pages. For more information regarding how to manage the Content Pages themselves and creating new pages on your store, see the Content User Guide.

Introduction

Aurora Content (Pages) refers to a particular type of content in Aurora, which allows you to create entire pages for accessing on the Front-end of your Store on any configured URL. You can manage your Content Pages from the Aurora Back-end under Content > All Content and the templates for these allow you to present these pages in any way you see fit.

Content Page Templates

By default, pages created in the Content section of Aurora are presented using the following template:

templates/example.com/content/page.tpl.html

This template is used to 'surround' the content you create using the Aurora Content Pages system, allowing you to manage the general layout of all your Content Pages from one generic template, including but of course not limited to:

  • Headers
  • Navigation
  • Footers
  • Metadata

Custom Content Page Templates

🚧

Before considering creating your own bespoke Content Templates for use with specific page layouts, it's important to note that the Aurora Content Pages system permits you to enter Smarty Tags into it's content freely, and so you should only need to consider doing this if the overall layout of the page as a whole might need to be changed, rather than to simply include Smarty logical elements (e.g. IF/ELSE conditional blocks).

If you do not want to use the default presentation template (as described in the Content Page Templates section) for a page, then you are free to create your own and configure them for use in Aurora for the presentation of your Content Pages.

To do this, you should follow these steps.

1) Create your template

You should create your template in the templates/example.com/content/ directory within your own template directory (i.e. replace "example.com" with the directory name that your templates actually reside in).

👍

Remember, you can always simply copy and past the existing page.tpl.html template to use as a platform to get you started when producing your own custom presentation template.

2) Configure your template for use by the Aurora Content system

Before you can use this template to present your Content Pages, you must tell Aurora this is permitted and so in the Aurora Back-end under Store > Templates. Please see this on the Aurora Demo Store here:

https://demo.auroracommerce.com/aurora/store/templates

From here you should:

  • Provide a name for your Template.
  • Select the type of template it will be use as (e.g. in this example, ti would be 'Content').
  • The filename of the template, without any directory of extension, e.g. the template "content/my-custom-template.tpl.html" should be detailed as "my-custom-template".
  • Finally, you may also set the template to be used as the default template for all your Content Pages if you wish, by ticking the tick-box at the end.

Please see the UI for the above in the image below.

Once you have configured this, click the 'plus' button and this will be saved to Aurora ready for you to use.

3) Configure your Content Page to make use of your template

Once you have added your new template, simply go to the Content Page you would like to have use this new template in the Aurora Back-end under Content > All Content > Edit and configure it to be used as shown in the image below.

📘

This is found on the right-hand-side of the Content Edit page. See an example URL from Aurora Demo below:

https://demo.auroracommerce.com/aurora/content/add/page

Once you have done these three things, your new template will be used to present the content you have added on the URL it is configured to be hosted on.

Related Aurora Demo Example Files
example.com/content/page.tpl.html