In: Content Management Systems / Seditio / Seditio Tutorials

Custom TPL's

Custom headers, footers, and pages for your skins.

Print
Author: Dyllon
Submitted by: Brock   Date: 2008-03-09 18:46
Comments: (0)   Ratings:
No comments yet
Description

The purpose of this tutorial is to teach web administrators how to use custom Header, Footer, and Page TPL files. The use of custom TPL's are to make different categories, or sections of your website to have a different appearance than the regular style. It comes in great use for many of areas.

Pre-Editing

Seditio comes with a pre-defined variable named $cfg['enablecustomhf']. In order for you to use custom TPL's, you must first enable this variable.

To do this, open 'system/functions.php' and search for:
Code:
'$cfg['enablecustomhf'] = FALSE;'


That tells us that it is disabled, so replace it with:
Code:
'$cfg['enablecustomhf'] = TRUE;'
However, if you'er using custom pages, or lists; you do not need to edit this. All you need to do is what is listed for pages/lists.

Header

There are many ways that you can use a custom header on your site. I have found it useful for Forums, Administration Panel, pages, and more. Using a custom header is not much harder than adding a new tpl file to your skin directory. Just add the file and name it 'Header.location.tpl'

You may ask, "what is location?" Location is the section that you are forcing the new header file. These are the locations that you may use:

header.Administration.tpl
header.Forums.tpl
header.Pages.tpl
header.Messages.tpl
header.PFS.tpl
header.Plugins.tpl
header.Private_Messages.tpl
header.Users.tpl
header.Views.tpl

Footer

The footer follows the same principals as the header. If you need to use a custom footer for your site, follow the same steps as adding a new header. You may also use the same list of files.

Custom List TPL

For most of my sites, I have always needed the use of a custom list TPL file. Mainly because when I offer my skins for download, I like to show a mini-preview of the skin to the side. However, I don't want to change the look of my pre-existing list.tpl. Thats where this comes in! All you need to do is make a new copy of your list.tpl and paste it as 'list.code.tpl'

The 'code' is what you entered in your page structure in the administration panel. If you need to know what this is, open your administration panel and click on Pages. Once you're there, click on structure of pages and in the list it will have a column named 'code', and that is what you use.

Here is how you would use this:

list.CAT.tpl
list.group.CAT.tpl
page.CAT.tpl
page.add.CAT.tpl
page.edit.CAT.tpl

Extra

This is a list of some of the areas that you can customize the TPL of:

forums.posts.FCAT.FORUM_ID.tpl
forums.topics.FCAT.FORUM_ID.tpl
forums.editpost.FCAT.FORUM_ID.tpl
forums.newtopic.FCAT.FORUM_ID.tpl
users.banned.tpl
users.inactive.tpl