Carry out the following steps:
Create a file named
view.php
in your theme.Put the following code in it:
<?php defined('C5_EXECUTE') or die('Access Denied.'); $this->inc('elements/header.php'); ?> <div id="content"> <?php echo $innerContent; ?> </div> <?php $this->inc('elements/footer.php'); ?>
We've created another file in our theme which looks a lot like default.php
. However, there's one major difference; view.php
must always output the variable $innerContent
. The content of single pages is generated by program code and saved in $innerContent
.
Some controllers use more variables which you'll have to process as well in order to replace the concrete5 core layout. The login page, for example, has another variable in order to make sure errors are printed too.