Integrate Existing Theme
You can easily integrate any HTML / CSS theme available on the internet from places such as ThemeForest. It
should generally only take about 30 minutes to integrate an existing theme. To do so, follow the below steps.
- In terminal, move to the Apex installation directory, and type
./apex create theme theme_alias
- Slice the main page into header.tpl and footer.tpl files, and place them within the /views/themes/theme_alias/sections/ directory. Save the remaining homepage body contents to /views/themes/theme_alias/tpl/index.tpl.
- Within terminal run:
./apex init_theme theme_alias, which will go through the files created in previous step, and add the ~theme_uri~ merge field to all internal links as necessary.
- Add the
a:nav_menu> HTML tag where needed in place of the navigation menu. If you only want the navigation menu to be displayed to logged in users, use:
<a:if ~userid~ != 0> <a:nav_menu> </a:if>
<a:page_title textonly="1"> where needed, of course within the
<title> tags of the header, then usually once at the bottom of the header.tpl file.
- Add the
<a:callouts> tag where necessary, generally at the very bottom of the header.tpl file. This will be replaced with any callouts / messages (ie. user submission errors).
- Add the
<a:scoail_links> tag where necessary, which will be replaced with all social media icons / links as defined by the administrator.
- Create a file at /views/themes/theme_alias/layouts/default.tpl as necessary. Below shows some example code of what the file may look like.
- Modify the /views/themes/theme_alias/tags.tpl file as necessary, and update the various HTML snippets as needed for this specific theme.
- Add a screenshot.png file to the /public/themes/THEME_ALIAS? directory, with the size of 300x225px.
- Modify the file at /themes/THEME_ALIAS/theme.php, and define the few variables at the top as necessary.
That's it. To activate the theme, open terminal, change to the installation directory and type:
./apex change_theme public THEME_ALIAS
The theme will now be active on the public web site.