Position of modules in the Joomla template

A distinctive feature of Joomla is an opportunity to interact with various external applications. The variety of extensions, Joomla allows us to equip the site with everything you need. All the user sees on the site, created by pre-or third-party extensions Joomla: components and modules. To output component is usually provided for the central region of the template, but the number and location of modules depends on our imagination and need.

What is the position of the modules in a template?

The position of the modules is an area of ??the template is designed to display modules published in her website. In one position may be published on an unlimited number of modules. Display order of modules in the positions set in the Module Manager administrative panel of Joomla.

How to know what is the position of the modules in a template?

To determine the available module positions in the template there are two methods:

  1. Found in the file index.php template, all function calls mosLoadModulesAnd see the first argument of this function.
  2. Set the template you are interested in the site, and then in the browser address bar, after the name of the site to add ? Tp = 1. For example, if you want to know what positions are defined by templates our websiteJust type: http://joomlaportal.ru/?tp=1.

How to add a module position in template?

Positions for the modules specified in the file index.php template using the mosLoadModules:

mosLoadModules( $ Position_name , $ Style);

$ Position_name – The name of the position $ Style – Style O module

For the convenience of beginners in Joomla! already established basic names of the positions for modules (option $ Position_name):

advert1, advert2, advert3, banner, bottom, cpanel, debug, footer, header, icon, inset, left, legals, newsflash, pathway, right, toolbar, top, user1, user2, user3, user4, user5, user6, user7, user8, user9.

Note: Do not forget, this is only the names of positions, position themselves for the modules you need to ask for your template. If you publish the module, for example, in the position footerNot specifying it in the template, the module will not be displayed on the site.

All the names of the positions for modules Joomla absolutely equal. To add, delete or change the titles of items, select menu item “Site-> Templates-> Location modules» (Site-> Template Manager-> Module Positions).

Styles of display modules are defined in includes / frontend.html.php. It currently supports the following styles (parameter $ Style):

  • mosLoadModules (“position”) – used for standard output modules in the tables
  • mosLoadModules (“position”, 1) – used to display module horizontally
  • mosLoadModules (“position”, -1) – used to output modules without tables and block div, the module will not be heading
  • mosLoadModules (“position”, -2) – used to display module blocks div
  • mosLoadModules (“position”, -3) – used to create a module round corners

Note: The parameter $ Style responsible for the way the output modules in position. But the appearance of the modules is given directly in the file template_css.css template.

For example, if we want to determine the position of the modules leftAnd wish that the modules are not listed in the table, and in layers, you need a template, insert the following code:

 
<? Php mosLoadModules( 'Left', -2 ); ?>.

Comments are closed.