concrete5 makes it easy to create themes, but out of the box it does not apply themes to system pages, such as the login page. For most websites, this is fine, since only site editors will see the login page. On sites where site readers can log in and leave comments, or post in forums, it would be nice to have the login page match everything else. In this recipe, we will make the login page use the same theme as the rest of the site.
We will continue working with the custom theme that we built at the beginning of this chapter. As always, the code for this recipe is available to download for free from the website for this book.
The steps for customizing system pages are as follows:
Open
/config/site_theme_paths.php
in your preferred code editor.Enter the following code in the
site_theme_paths.php
file:$v = View::getInstance(); $v->setThemeByPath('/login', "basic_theme");
Open
/themes/basic_theme/view.php
in your code editor.Enter the following...