Overview of templates structure

 

Avactis is designed to make storefront customization as simple as possible.

It is possible to modify the design of Avactis using any HTML WYSIWYG editor, e.g. Dreamweaver:

All design themes of Avactis are stored in the "Avactis-themes" folder.
The default design theme of Avactis is located in the folder "Avactis-themes\system".

You can have as many themes in the "Avactis-themes" folder as you like.
The main design theme file is map.ini.

For example, the following file is the main file for the "system" design theme:

Avactis-themes\system\map.ini

The map.ini file is the layout file, if you will open it, you will see its simple structure.

For example you will see these sections inside map.ini file:

[default]
[index.php]
[cmspage.php]

 
Each section describes what blocks will display on specific store pages.

For example, the content of the [default] and [index.php] sections is as follows:

[default]
template = "page.template.tpl.html"
page_title = "<?php StoreOwnerPageTitle(); ?>"
page_description = "<?php CategoryMetaDescription(); ?>"
page_keywords = "<?php CategoryMetaKeywords(); ?>"
logo = "<?php CMSPageContent('logo'); ?>"

[index.php]
left_column = "<?php NavigationBarCustom(1); ?><?php SubscribeBox(); ?><?php FeaturedProducts(1); ?>"
center_column = "<?php CMSPageContent('welcome_text'); ?><?php Subcategories(1); ?><?php Bestsellers(1); ?>"
right_column = "<?php CMSPageContent('right_banner'); ?><?php CurrencySelector(); ?><?php MiniCart(); ?><?php CustomerSignInBox(); ?><?php ProductSet_Rand(); ?>"

 
If the placeholder is defined in the default section, it is not necessary to mention it in other sections. For example, if left_column is defined in the default section, it will be the default for all other sections and the storefront.

To move any block from left column to center or right column on the index.php page, move its tag (e.g. <?php MiniCart(); ?>) to the required column in the [index.php] section.

The logo, left_column, center_column and right_column values, are the "placeholders" which should be mentioned on the main template of theme.

Main templates of the system theme are:

Avactis-themes\system\pages\templates\page.template.tpl.html
Avactis-themes\system\pages\templates\part.header.tpl.html

An example of the page.template.tpl.html templates structure:

    <div class="box page_header">
        <div class="cn lb"></div>
        <div class="cn rb"></div>
        <div class="content">
            <!-- LOGO -->
            <div class="logo">#logo#</div>
            <!-- HEADER SEARCH FORM -->
            <div class="top_user1">#user1#</div>
            <!-- HEADER SMALL MENU -->
            <div class="top_user2">#top_menu#</div>
        </div>
    </div>

 
As you see, it is HTML code (which may be modified using any HTML editor), inside which you can see the "placeholder" from map.ini file, e.g.: #logo#

#logo# is actually this code from the [default] section in the map.ini:

logo = "<?php CMSPageContent('logo'); ?>"

 
The # symbols in the name of the logo tell the system to print the content of the logo in the template.
To check whether the placeholder is empty, use this construction: <?php if ('[logo]' != ''): ?>

The design of tags may also be customized using templates or CMS.

To modify the content of this tag: <?php CMSPageContent('logo'); ?>
you should find the logo page in the CMS of Avactis.

To modify the <?php MiniCart(); ?> tag or any other tag from Avactis Tag Library, you should to modify its templates.

All templates of Tags are located in the Avactis-themes\system folder. For example Mini Cart templates are located here: Avactis-themes\system\catalog\shopping-cart\minicart\

Note
To switch the default theme of Avactis to another one, modify the TemplateDirectory path in the Avactis-layouts/storefront-layout.ini file


  © 2004-2010 Pentasoft Corp. Corp. All Rights Reserved.