Creating the 'Sectors'

User Manual » Advanced Topics » Creating a New Theme » Creating the 'Sectors'


A 'sector' within a theme is simply a placeholder/container for modules output. One or more modules can be attached to a sector, either graphically through the Content Layout module or by editing the layout files in the 'config/default/layouts/' directory. This sector placeholder is then placed anywhere within your theme that you would like it to display.

Each sector has a unique ID (for that theme) which is in the format of 'S' followed by any number, e.g: S3. This then becomes the tag you use within your 'main_template.html' file, such as '{S3}'. The tag placeholder will then be replaced with the output of any module(s) attached to it (if any), and can occur more than once in the file.

Managing Theme Sectors

You can have as many sectors as you wish for your theme, and these are controled by the 'sectors.xml' file within your theme directory, e.g 'assets/themes/foobar/sectors.xml'. This is a very simple XML file, however if you do not have any XML knowledge you should be able to easily see what is going on, and just copy/paste the parts.

Add/Edit/Delete any sector you wish, making sure that each sector has a unique ID. The 'description' element is there to give a more human readable version of the sector ID, since it is far easier to remember 'Left Sidebar' than 'S2'.