Creating a concrete5 Theme
Additional concrete5 theme-related documentation can be found at concrete5.org.
Code Recap
The following are examples of the code that was used in the movie, to setup editable areas, and make a template editable.
Add an area named "Main Content 2" to a page
- <?php
- $a = new Area('Main Content 2');
- $a->display($c);
- ?>
Make a template editable
Remove the title tag from a template, and replace it with this:
- <?php
- Loader::element('header_required');
- ?>
Common area and template names
Standard area and template names for themes
Just to clarify, for those whose php is a little rusty and couldn't see the coding example in the video too well, the syntax for getThemePath is:
- <?=$this->getThemePath()?>
And to insert it into a line that originally says:
- <link href="style.css" rel="stylesheet" type="text/css" />
And add it like this:
- <link href="<?=$this->getThemePath()?>/style.css" rel="stylesheet" type="text/css" />