Difference between revisions of "Templates"

From AV Scripts Wiki
Jump to: navigation, search
(Created page with "Templates in AVCMS are built using the [http://twig.sensiolabs.org/ Twig template engine]. == Getting started == If you are not familiar with the Twig template engine then y...")
 
Line 1: Line 1:
 
Templates in AVCMS are built using the [http://twig.sensiolabs.org/ Twig template engine].
 
Templates in AVCMS are built using the [http://twig.sensiolabs.org/ Twig template engine].
  
== Getting started ==
+
== Getting Started ==
  
 
If you are not familiar with the Twig template engine then your first step is to learn the basics by reading the [http://twig.sensiolabs.org/documentation Twig documentation].
 
If you are not familiar with the Twig template engine then your first step is to learn the basics by reading the [http://twig.sensiolabs.org/documentation Twig documentation].
  
== Overriding templates and assets ==
+
== Overriding Templates and Assets ==
  
 
The only template required in your theme is the index.twig file. But if you want to change the layout of other pages beyond what you are able to do with CSS, you can override them. You can also override default CSS and Javascript files. Remember, the more files you override, the more work you need to do when AVCMS is updated and changes are made.
 
The only template required in your theme is the index.twig file. But if you want to change the layout of other pages beyond what you are able to do with CSS, you can override them. You can also override default CSS and Javascript files. Remember, the more files you override, the more work you need to do when AVCMS is updated and changes are made.
  
 
The first step to overriding a file is finding out the name and location of the file you want to overwrite. When in developer mode you can find the name of the current page template on the developer toolbar at the bottom of all pages.
 
The first step to overriding a file is finding out the name and location of the file you want to overwrite. When in developer mode you can find the name of the current page template on the developer toolbar at the bottom of all pages.
 +
 +
== Template Settings ==
 +
 +
You can create settings for your template that can be configured by admins in the AVCMS admin panel. For example you could have a setting that changes the background colour of the page or a setting that allows users to change the site logo.

Revision as of 10:06, 25 March 2015

Templates in AVCMS are built using the Twig template engine.

Getting Started

If you are not familiar with the Twig template engine then your first step is to learn the basics by reading the Twig documentation.

Overriding Templates and Assets

The only template required in your theme is the index.twig file. But if you want to change the layout of other pages beyond what you are able to do with CSS, you can override them. You can also override default CSS and Javascript files. Remember, the more files you override, the more work you need to do when AVCMS is updated and changes are made.

The first step to overriding a file is finding out the name and location of the file you want to overwrite. When in developer mode you can find the name of the current page template on the developer toolbar at the bottom of all pages.

Template Settings

You can create settings for your template that can be configured by admins in the AVCMS admin panel. For example you could have a setting that changes the background colour of the page or a setting that allows users to change the site logo.