Skip to content
You are here: Home arrow Sobi2 arrow Use of Templates
Use of Templates
Written by Sigrid Suski   

SOBI2 has an integrated template system for the appearance of the details view, the V-Cards in the category view and on the search results page and the for add/edit entry form.

Overview

For each view there is a separate template file available. These template files can be edited in the SOBI2 administration panel. From the left SOBI2 main menu select "Templates & CSS".

SOBI Templates

 

Template Manager

Using the Template Manager different template packages can be installed. You will find additional template packages in our Download Directory. SOBI Template Manager


Install a new template to use it instead of the default SOBI2 template or install several templates to use different templates for the categories.

To install a new template click on "Browse" and select the template package from your computer and click on "Install".

See also creation of a template package.

Before you install the template package make sure that the folders /components/com_sobi2/templates/ and /administrator/components/com_sobi2/includes/install/ are writeable. For that perform a system check ("About"->"Perform System Check").

SOBI Template Manager

To choose another template as the default template, click on the red X. The default template is indicated with a green check.
The default template is shown for those categories for which no individual template is selected.

SOBI Template Manager

If you hover over the name of the template package a preview window is shown. It contains a description of the package and a thumbnail image.

 

Category Dependant Templates

Use different templates for categories to show fields category dependant. That means, you can show different fields for different categories. Also you can use a different appearance (colors, fonts) for each category.

SOBI Category Template

To choose an individual template for a category, edit the corresponding category in the "Entries & Categories" section. At the right bottom there are the category template settings. Select the template to be used for this category. You can change here also other category dependent settings like the number of lines on a page, the number of entries in a line and the number of sub categories shown in a line.

The selected template will be used only for the category for which it is set. It will not be used automatically for sub categories of the category. To use it in the sub categories too, edit the sub category and select the template.

For the V-Cards which are shown after a search is performed always the main default template is used.

If an entry is in more than one category, the details view of this entry is shown with the template of those category which is added first to the category list of the entry. That means, if you want to add an entry to more than one category you should not use this feature.

However, it is not possible to use different add/edit entry form templates. Always the add/edit entry form template of those package is used which is set to default. If the default package does not contain a template file for the add/edit entry form the standard SOBI2 add/edit entry form template is used.

 

Edit Templates

To edit the template files go to the SOBI2 administration panel ("Templates & CSS") or edit the files directly.

The template files are located in the SOBI2 template folder in /components/com_sobi2/templates. The default templates from the installation package are located in the folder /components/com_sobi2/templates/default. Please note that the location of the template files of older SOBI2 versions can be different.

The names of the template files cannot be changed. These names are:
  • Details view template: sobi2.details.tmpl.php
  • V-Card template: sobi2.vc.tmpl.php
  • Add/Edit entry form: sobi2.form.tmpl.php

To modify the template files, at least HTML skills are necessary. For some extended operations also PHP skills are necessary.

To edit the different template files within the SOBI2 administration panel, choose first the template to be edited at the top of the screen. This does not select the template to be shown on front page. Choose that in the Template Manager or in the category.

SOBI Templates

See also the description of the template commands for details view and V-card.

 
Ads/Anzeige
SobiPro - Joomla! Directory Extension
Ads/Anzeige
Featured Listings for SOBI2
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