Difference between revisions of "Template Customization"
(→Adding new pages) |
|||
Line 49: | Line 49: | ||
== Adding new pages == | == Adding new pages == | ||
− | Use the basicphptemplate.php in the root AWBS directory and the basictemplate.php file in the templates/ | + | Use the basicphptemplate.php in the root AWBS directory and the basictemplate.php file in the templates/common_files directory to make new pages for your site. |
It works like this: | It works like this: | ||
Line 62: | Line 62: | ||
replace basictemplate.php with webdesign.php | replace basictemplate.php with webdesign.php | ||
− | *Now take the basictemplate.php file in your templates/ | + | *Now take the basictemplate.php file in your templates/common_files directory, copy it to your theme directory and rename it webdesign.php, edit as desired and you have a new page on your site that matches all the rest. |
− | In the template file, enter your page | + | In the template file, enter your page xhtml content where it shows the remark:<nowiki><!-- Add your page contents here --> |
</nowiki> | </nowiki> |
Revision as of 15:17, November 25, 2008
Note: This information refers to AWBS version 2.8.0 and newer.
Template Information
The user web interface template files are located in two locations.
All files common to all themes are in; templates/common_files directory
All files unique to a theme are in; templates/[theme_directory]
Theme directory files override common_files files if they exist.
For example: If you copy support.php from common_files to your theme directory and edit it, your site will use the support.php file in the theme directory and ignore the support.php file in the common_files directory.
The top.php, bottom.php and header.php are used for all pages of the user web interface.
top.php creates the header area of the web pages
bottom.php creates the footer area of the web pages
header.php handles the <head> section with meta tags and other needed code for the system's functionality.
The optional left.php is included on all non member pages (pages without the left member menu)
- To edit the menu edit;
templates/common_files/group1menu.php
or if you are using portal mode
templates/common_files/group1cpmenu.php
INFO The group1 refers to the user group, if you add user groups you can give them their own custom menu by creating new menu files. Example: You add a new user group and it will be group 2 Create a new menu file named group2menu.php When the group 2 users log in, their menu will change to the group2menu.php file instead of the default group1menu.php file.
- To edit the text on the menu links, edit the includes/language/english/global.php file
- The stylesheet used for the menus is:
templates/[your_theme_directory]/css/menu.css Note: this stylesheet is used for both the site menu and the member area menu
Adding new pages
Use the basicphptemplate.php in the root AWBS directory and the basictemplate.php file in the templates/common_files directory to make new pages for your site.
It works like this:
You use the basicphptemplate.php file in your root AWBS directory and call the basictemplate.php that you add your content to and place in your templates/theme directory.
Example: you want a new page called webdesign.php
- Take the basicphptemplate.php file, copy/rename it to webdesign.php, edit the file to call webdesign.php template.
This line: print $template->parse("basictemplate.php"); replace basictemplate.php with webdesign.php
- Now take the basictemplate.php file in your templates/common_files directory, copy it to your theme directory and rename it webdesign.php, edit as desired and you have a new page on your site that matches all the rest.
In the template file, enter your page xhtml content where it shows the remark:<!-- Add your page contents here -->