-
Notifications
You must be signed in to change notification settings - Fork 0
Creating the skin module
Please see Creating LiteCommerce module to get the detailed instruction.
Also you need to choose the skin name. It will be used for naming the directory with templates for future skin. As an example, let it be john.smith.example
.
If there is no init
method declaration in Main.php
, overriding the parent method, please declare it.
Here is the example:
/**
* Method to initialize concrete module instance
*
* @return void
* @access public
* @since 3.0
*/
public static function init()
{
parent::init();
}
Declare our substitutional skin in this method:
/**
* Method to initialize concrete module instance
*
* @return void
* @access public
* @since 3.0
*/
public static function init()
{
parent::init();
\XLite\Core\Layout::getInstance()->addSubstutionalSkin('john.smith.example');
}
In our example we need to create skins/john.smith.example
directory with the en
subdirectory in it.
The created module holds the new skin. As you can see, the module can include several skins and modifications, not only single skin. Afterwards the module should be enabled in the Admin zone, and the skin directory should be contained with the templates repeating the main skin file structure.