Overview

Once you familiarise yourself with the concepts of fields, sections and entries you can start writing your own front end templates. At the heart of the IgnitedCMS engine is a simplified PHP template engine. A front end way of getting data out and dumping it to your views.


There are only a few rules. You must include a _layout.php and _footer.php file which lives in the root of the views folder. You can of course customise this to your own style and even include external css and js files.


But you MUST not rename or delete these files. It is the heart, if you like, of the main engine. As soon a you create a section, the name of your section will form the PHP name. For example,if you created a section called home, you need to create a PHP file called home.php inside your custom folder.


Your section template MUST contain a file called _layout.php template and a footer file called _footer.php both placed at the root of the views folder. Typically the header will call all the css styles and the footer will contain the javascript files.

<?= $this->load->view("_layout"); ?>
<?= $this->load->view("_footer"); ?>

Let's say you have a text field in your section called title.


To output this in home.php all you would do is write

<?= $title ?>

And this will dump the content of that field into the home template. Pretty nifty! But if this all seems like too much manual work, relax, all you have to do is click the boiler plate generator link when you are inside your template and the ignitedCMS engine will manually create the file and subdirectory if necessary.


It really doesn't get any easier than this!