Thursday, December 26 2024

You are here: bloofox.com >> Help >> General FAQ >> Template Setup

How To Setup A Template

The template system is really easy to understand. This article shall help you to create your own template.

First you should know that templates are completely free of any PHP code. You need only little know how in HTML or XHTML and CSS. So before you start you should think about which document type you want to use. In Admincenter you have to define the document type equal to HTML or XHTML. For example you created a template in HTML 4.0(1) then you must select HTML4.01 in your website configuration in Admincenter, field Meta-DocType. When you use a different document type to your template you will have some trouble with it.

Now let's get started.

The easiest way to begin is to copy the default template in folder /templates and save the copy under a name you like. The result should be an additional folder in folder /templates, e.g. /templates/bloofox. In your template folder there are some files, at the beginning you will need only two of them:

default.css - style sheets for the template
default.html - main template

The main template file includes the skin of your website. You may change the complete code in it. The only things you should keep are the placeholders and it would be nice to keep a little link to bloofox.com like powered by bloofoxCMS. The placeholders in this file are responsible for loading the contents and information from database. They will be replaced while the website is loaded. The placeholders are recognized using curly brackets {}. These are the basic placeholders:

- document type
- HTML header
- main website url
- website name
- logout link, only displayed if logged in
- contents
- print view
- content is split to more pages (if more than 10 text contents are on one explorer page)
- your copyright notice

Important
There are no spaces between the brackets and the name of the placeholder. This is for presentation only.

The placeholders beginning with will load plugins if they were installed. If not you can delete the placeholder or you have to install this specific plugin. These plugins are installed by default:

- current date with weekday
- main menu
- submenu to main menu
- displays a searchbox (search works only if plugin search is included in content explorer)
- login box
shows current location of page (e.g. Home -> Help)

Additional placeholders for more plugins are specified in its specific help.

When you have finished designing the main template you may begin editing the style sheets. Some defined style classes are used in templates (also plugin templates), but some are also coded in PHP code.

The next step is to upload your template folder via FTP to your server. After uploading you can go to Admincenter -> Administration -> Templates and chose add a new template. The name of your template must be equal to the folder's name. Then type in your main template and style sheets file. After adding this entry to database you may select your new template in a website configuration and see the result online.

Mister Wong del.icio.us Yigg it LinkARENA




Latest News

ImagebloofoxCMS 0.5.2.1 available

Read more

ImagebloofoxCMS 0.5.1 available

Read more

ImagebloofoxCMS now available on github

Read more

Make a donation

You may help us by making a little donation. Please click the image beside. Thanks for your support!