... Elxis version 2009.3 codename Aphrodite is out, download it from Elxis Download Center (EDC) ...
Modules style
From Elxis Official Documentation
In an other article we discussed how we declare modules positions and set modules to be displayed in specific positions. Here we will show you how we can style these modules. First of all let's remember how we can load modules in our template's index.php file. There are 2 methods:
Load modules by position
mosLoadModules('position_here', STYLE); //Where STYLE the method used to style the modules for this position (we will talk about this later)
Load a single module regardless it's position
elxLoadModule('module_name_here', STYLE); //Where STYLE the method used to style the module (we will talk about this later)
The style parameter is optional and sets the way the modules will be loaded in the defined position. Valid style values are: 0, 1, -1, -2 and -3.
Contents |
(0) Display modules inside tables (default display)
Modules are displayed inside tables. This has been kept as the default method for loading modules mostly for compatibility reasons. We recommend you to use DIVs (style: -2).
If you set 0 as style then Elxis will output modules html in a table with CSS class moduletable:
<table cellpadding="0" cellspacing="0" class="moduletable"> <tr> <th valign="top">Module Title</th> </tr> <tr> <td>Module output</td> </tr> </table>
(1) Display modules inside tables horizontally
Each module is output in the cell of a wrapper table with class moduletable. Sample output:
<table cellspacing="1" cellpadding="0" border="0" width="100%"> <tr> <td align="top"> <table cellpadding="0" cellspacing="0" class="moduletable"> <tr> <th valign="top">Module Title</th> </tr> <tr> <td>Module output</td> </tr> </table> </td> <td align="top"> <!-- next module here --> </td> </tr> </table>
(-1) Display modules as raw output and without titles
When you set style to -1 the modules will be displayed as raw output, without any wrapper and without titles. This is the way the Language module is being displayed in the Okto template. Sample output:
<!-- module contents here -->
(-2) Display modules inside DIV element (recommended output)
The whole module is enclosed by <div> while the module's title by <h3> tag. A CSS class named moduletable is applied to the container <div>. Notice that this is the recommended method to style modules. Sample output:
<div class="moduletable"> <h3>Module Title</h3> <!-- Module output here --> </div>
(-3) Rounded corners
Modules are displayed in a format that allows stretchable rounded corners. If this style is used the name of the <div> changes from moduletable to module. Sample output:
<div class="module"> <div> <div> <div> <h3>Module Title</h3> <!-- Module output here --> </div> </div> </div> </div>
Rounded corners guide on Elxis.org
| For backwards compatibility 0 is the default modules style. So if you don't fill in the style parameter in the mosLoadModules function Elxis will generate tables. We strongly recommend you to always set the style parameter to -2 or to -1 or -3 for special modules in order Elxis to generate table-less (X)HTML. |

