How to create a new template
From FreeWay
Contents |
[edit] Template Design Notes
[edit] Tables Used
template Table Usage
For each template we need a entry in template table containing the details like template name, folder name, cellpadding, shown modules, left and right column display etc.
infobox_configuration Table usage
The left menu in the front-end contains a list of boxes displaying details like event, product, service, information. The information like row position, active, column position for this infoboxes are stored in this ===table.
[edit] Template Files Used
Working files
*osCommRes is template folder name
/templates/osCommRes/boxes.tpl.php /templates/osCommRes/extra_htmloutput.php /templates/osCommRes/main_page.tpl.php /templates/osCommRes/header.php /templates/osCommRes/footer.php /templates/osCommRes/stylesheet.css /templates/osCommRes/events.css
Images and buttons files
/templates/osCommRes/images/*.* /templates/osCommRes/images/buttons/*.*
Left Menu boxes files templates/osCommRes/boxes/*.* Content files templates/content/*.*
[edit] Frontend file structure using template
| File Type | Description | Path |
|---|---|---|
| Root File | Accessed by the client | / |
| Content File | Content for the requested file loaded from the root file | /templates/content/ |
| Language file | Language content used in the content file | /includes/languages/english |
[edit] Divisions of a single front-end file accessed
- Header - logo, search box, Navigation menu are created in header.php. Site width adjusted using the template setting
- Left Menu - left menu can be turned on or off using backend template setting. The infoboxes from “templates/boxes” is loaded into this left menu. Each one contains information like event, subscription etc.
- Right Menu - right Menu can be turned on or off using backend template setting. The infoboxes from “templates/boxes” is loaded into this right menu. Each box holds different information like shopping cart, login box etc.
- Content - actual content of the accessed page is loaded from templates/content.
- Footer - time, company name, navigation menu are loaded in footer.php.
[edit] Notes for creating a new template
- For a new template a record entry have to be created in template table containing information like folder name, cell padding, site width etc.
- The infoboxes shown in the front-end have to be added in infobox_configuration table.
- Template setting can be adjusted using backend menus customization->template_admin, customization->infobox_admin
- Most of the styles used in the pages are defined in the files /templates/<template_name>/events.css, /templates/<template_name>/stylesheet.css.
- Buttons can be created with the same names located in default oscommres template folder. Path /templates/<template name>/images/buttons/English/