BruisedFruit Template Tutorial

 

Introduction

The BruisedFruit template system is as unobtrusive as possible. We understand that people don't want to have to learn a new proprietary format for each and every product they use. As such, the BruisedFruit template system works by parsing standard PHP files looking for a series of predefined tags.

Creating a new template

If you are new to BruisedFruit templates, the easiest thing to do here is to copy the existing, standard template.

Now that you have uploaded your new template folder, it's time to edit your BruisedFruit configuration file to make your wiki use it.

Voila! Your BruisedFruit wiki is now using a custom template!

Decorating your new template

Of course, your new template looks exactly like the standard BruisedFruit template, so you won't notice the slightest difference. Before you start hacking away, making changes left, right and centre, there are a few important things that you must keep in mind while working on a BruisedFruit template:


Template tags

Here's a breakdown of BruisedFruit template tags and how and where you should use them:

Generic BruisedFruit template tags

There are some BruisedFruit template tags that will work regardless of which page they are placed in. These are:

view.php template tags

These tags are specific to view.php:

The article timeline is responsible for generating a list of users who have previously modified the article that is being viewed:

search.php template tags

These tags are specific to search.php:

edit.php template tags

These tags are specific to search.php:
 
Edit this articleEdit this article
Last modified by: Nial (March 29, 2008, 5:18 pm)
Previously modified by: Nial (March 29, 2008, 5:18 pm)
Proudly powered by BruisedFruit