Using Multiple Themes
Apex allows the use of multiple themes based on location of the template file being rendered. For example, you may wish to utilize one theme for an administration panel, another theme for the member's area, and another for the public web site.
First, ensure all necessary themes are created and located within the ~/views/themes/ directory, so using the above example of three themes, you may have something like:
- /views/themes/default
- /views/themes/limitless
- /views/themes/orbiter
Open the /boot/site.yml file, and the first element is themes
, which defines which theme to utilize based on location of the template file being rendered. For example:
themes:
admin/: limitless
members/: orbiter
default: default
With the above in place, the structure of the body content pages in ~/views/html would look like:
- /views/html/admin/ (any files rendered will utilize
limitless
theme). - /views/html/members/ (any files rendered will utilize
orbiter
theme). - /views/html/ (all other files will utilize
default
theme)