I am having fun with Joomla Gantry framework. It is a bit heavy, but highly customizable, tons of template options. I tend to work with LESS, which makes me not CRY ( continuously repeat yourself ), is clear, fast to code etc. I will show you how to deal with gantry web fonts, to apply to whole website. How make it configurable from template control panel. How to override K2 styles in gantry ( get rid off K2 default font families )
A typical Joomla! Website consists of one component and many modules. Modules are a bit “bigger” than plugins and much smaller than components. Usually modules display content to the end user without his interaction. Modules execution cycle, Joomla finds module is assign to particular menu item and appears in particular module position within template index.php. In this article I am not going to build “Hello World” module (sorry everybody for disappointment), instead we are going to focus on building slider. To be more precise we are going to use jquery fractionslider ( website: http://jacksbox.de/stuff/jquery-fractionslider/ or GITHUB: https://github.com/jacksbox/jquery.fractionslider ) and transfer it into fully functional Joomla! 3 module. Source code for this tutorial is located on GitHub , it is fully working slider, the same as on my frontpage.
This is our “manifest” we are going to put there all configuration setting and file is going to be big! Have a look at GitHub repositories to see full mod_tksdfractionslider.xml . Lets have a look inside this file.
First it declares XML version and encoding. Then we have our extension type which in our case is module, version, client=”site” ( this is frontend module ) as oppose to client=”administrator” for backend modules. method=”upgrade” it is important, otherwise it will wipe out all data if this module had been previously installed on the system.
In this article I am going to demonstrate "core" module files. There are three important files. First two are located within module folder ( mod_tksdfractionslider.php and helper.php ) another is inside /tmp folder and its name is default.php ( it is our view ). Lets start from main module entry point which is in our case mod_tksdfractionslider.php.
<?php /** * @package TKSD Fraction slider for Joomla 3+ * @version 1.0.0 * @author Tomasz Kisielewski * @copyright (C) 2014- tkstudiodesign * @website http://www.tkstudiodesign.com * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU/GPLv3 **/