You are not logged in!
Login

You are here: bloofox >> 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:

{ doctype } - document type
{ head } - HTML header
{ url } - main website url
{ company } - website name
{ logout } - logout link, only displayed if logged in
{ tmpl_content } - contents
{ print } - print view
{ pages } - content is split to more pages (if more than 10 text contents are on one explorer page)
{ copy } - 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 {plugin_...} 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:

{ plugin_date } - current date with weekday
{ plugin_menu } - main menu
{ plugin_submenu } - submenu to main menu
{ plugin_searchbox } - displays a searchbox (search works only if plugin search is included in content explorer)
{ plugin_login } - login box
{ plugin_location } 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.

Bug Tracker & Feature Requests
Please write bugs to the bug list. If you want bloofoxCMS to get a new feature please write your idea to the feature list.

Mister Wong del.icio.us Yigg it LinkARENA



Latest News

ImageDownloads repaired

Read more

ImagebloofoxCMS 0.5.0 available

Read more

ImageTry the brand new BETA version!!!

Read more

Make a donation

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

bloofox & sourceforge.net

sfnet.gif bloofoxCMS is also available at sourceforge.net.
Project bloofoxCMS

Ads