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

  1. <?php
  2. $a = new Area('Main Content 2');
  3. $a->display($c);
  4. ?>

Make a template editable

Remove the title tag from a template, and replace it with this:

  1. <?php
  2. Loader::element('header_required');
  3. ?>

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:

  1. <?=$this->getThemePath()?>

And to insert it into a line that originally says:

  1. <link href="style.css" rel="stylesheet" type="text/css" />

And add it like this:

  1. <link href="<?=$this->getThemePath()?>/style.css" rel="stylesheet" type="text/css" />