Skip to content
You are here: Home arrow Sobi2 arrow Use of Templates arrow Template Package
Creation of a Template Package | Print |
Written by Sigrid Suski   

A SOBI2 template package is used to change the appearance of the details view, the V-Cards and the add/edit entry form.

The package consists of several files. Not all template files have to be included in a package. Which template files are included in a package is shown in the Template Manager after installation of the package.

SOBI Template Manager

 

Files of a Template Package

Besides the template files also a CSS file and other additional files can be included.
During installation of the template package a folder will be created in /components/com_sobi2/templates with the name of the XML file of the package. This name will also be used in the administration panel to choose the template.

  • XML installation file: <short name of the template>.xml
  • Details view template: sobi2.details.tmpl.php
  • V-Card template: sobi2.vc.tmpl.php
  • Add/Edit entry form: sobi2.form.tmpl.php
  • Additional CSS file
  • Thumbnail image file
  • Description file
  • Image files

The file names of the template files cannot be changed. For all other additional files there are no fix file names.

 

Structure of the XML File

The XML file is needed for the installation of the template package and the correct function of the Template Manager.

<?xml version="1.0" encoding="utf-8"?>
<sobi2template>
<author>Sigrid Suski</author>
<creationDate>November 2008</creationDate>
<copyright>(C) 2008 Sigsiu.NET</copyright>
<license>www.gnu.org/copyleft/gpl.html GNU/GPL</license>
<authorEmail>sobi@sigsiu.net</authorEmail>
<authorUrl>www.Sigsiu.NET</authorUrl>
<version>RC 2.9.0.2</version>
<name>Advanced Standard Template</name>
<description>Advanced Standard Template with Gallery on right side.</description>
<thumb>standard_advanced_thumb.png</thumb>
<files>
<file folder="css">standard_advanced.css</file>
<file folder="images">nopic.jpg</file>
<file>readme.txt</file>
</files>
</sobi2template>

Name of the author of the template package. It will be shown in the Template Manager.

<author>Sigrid Suski</author>

Creation date of the template package. It will be shown in the Template Manager.

<creationDate>November 2008</creationDate>

Copyright note.

<copyright>(C) 2008 Sigsiu.NET</copyright>

License type.

<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license> 

Email address of the author of the template package. It will be used in the Template Manager.

<authorEmail>sobi@sigsiu.net</authorEmail>

URL address of the author of the template package. It will be shown in the Template Manager.

<authorUrl>www.Sigsiu.NET</authorUrl>

SOBI2 version for which the template package is made. It will be shown in the Template Manager.

<version>RC 2.9.0.2</version>

Full name of the template. It will be shown in the Template Manager and in the preview window.

<name>Advanced Standard Template</name>

Description of the template package. It will be shown in the preview window.

<description>Advanced Standard Template with Gallery on right side.</description>

Thumbnail image. It will be shown in the preview window.

<thumb>standard_advanced_thumb.png</thumb>

In the "files" section all files are listed which should be copied to the template folder in the SOBI2 installation. If only the filename is given it will be copied to the root of the folder of this template. If a folder is set with folder=foldername, the file will be copied in this folder. The folder will be created during installation.

<files>
<file folder="css">standard_advanced.css</file>
<file folder="images">nopic.jpg</file>
<file>readme.txt</file>
</files>

 

The Package

Pack all files in a ZIP archive. Do not use any folders in the archive. Just zip only the files.

 

Using a separate CSS file

You can add a CSS file to your template. Keep in mind that the standard SOBI2 styles are already defined in the main SOBI2 CSS file. You either have to overwrite these styles using the !important; statement or delete these styles from the main SOBI2 CSS file.

When SOBI2 shows entries using your template, it will link to any CSS files in a subdirectory named "css" under your template's root folder. So be sure to include folder="css" in those <file...>...</file> lines of your XML file which describe your template's CSS files. All CSS files in the corresponding template folder are loaded automatically if the template is shown.

 
Ads/Anzeige
Become a SobiPro Gold Club Member
Ads/Anzeige
Become a SobiPro Bronze Club Member

Partner Sites: Joomla Web Design | redCOMPONENT | Joomla Downloads | CyberTyper | Codingfish | joomlaStuff | FLEXIcontent | Joostrap | StackIdeas | Joomla! Polska | Yagendoo