Creating Skins

From Efiction

Revision as of 03:44, 14 July 2006 by Admin (Talk | contribs)

In theory, there is no limit to the number of skins you can create for your site. If you have created skins for eFiction 1.1, you won't find many differences in 2.0 and 3.0. The number and names of the .tpl files have changed some though in later versions.

Contents

The Basics

The .tpl files

Template Variables

Items in curly brackets are variables, i.e. {output} or {authors}. They contains the actual content that will be printed out on the page. You can surround these attributes with any kind of html that you want -- font tags, tables, whatever. Some attributes are required on some of the template pages, and some are optional.

Certain template variables will only be useable on certain pages or within certain blocks while others can be placed anywhere. The page links are among the variables that can be placed anywhere on any page.

Template Blocks

These are items that generate multiple instances of content in a loop -- for example, in your index.tpl template file, you only need to indicate where the news items should display on the page with the following:


This line is telling the script to include the newsbox.tpl file, and the template files will understand that it should print out several news stories in a loop, with just that one line of code.

Another kind of block you may see is the following:

{category} {description}

This is another way to include a repeating block of code. In this case, one category in a list of multiple categories.

Changes in 2.0

Code Blocks

How to use variables.php

How to use extra_header.php

Converting 1.1 Skins to 2.0

See Converting Skins 1.1 to 2.0

Changes in 3.0

Personal tools