Preparation of Filenames

What this module does is simple: Place your images with a common name, like “topbanner” and with a unique number at the end into a common directory: e.g. “topbanner_1.jpg”, “topbanner_2.jpg”,… and so forth in folder “/templates/your-template-name/images/banners”

You can place your images into any sub-folder of your Joomla installation.

Also place a default image file there, e.g. “topbanner_default.jpg”

The module will do the following:

  • Based on the current content ID number (see “Parameters”) it will look for the image with the current ID, e.g. “topbanner_3.jpg”.
  • If that file is found, it is displayed in the content, otherwise the default image is shown

This results in a changing image on changing content. Cool eh??

Use “Modules → Site Modules” to assign “Header Image” to the template area of your choice. Then prepare the settings

If you use the position “header”, put

<?php mosLoadModules ( 'header' ); ?>

into your template file where you want the modules for your “header” position to insert their code. Please be aware of the different mosLoadModules parameters as these have influence on the HTML output.

You can use any of the template positions (Module Positions) or add your own new position. You also can use the module more than once in different positions.

To change the position, go under Modules/Site Modules/ click on 'Header Image' and use the Position option to pick your position.

To get the right image to come up in the right section, the number of the image must correspond to the number of the section. In “Modules/Site Modules/Header Image/Parameters”, if you use 'Section' for your 'Linked To' option, then the number of your .JPG file should correspond to the number of the section.

To find out the number of your section, go to “Content/Section Manager” and look to the column for 'Section ID'. That's the number of your section.

For example: If you have a section called 'About Us' and the Section ID is 25 then the name of your image file should be topbanner_25.jpg. The 25 is the correlation between section and file. That's how the module knows how to bring up the right image at the right time.

There are even more possibilities by using the modules Smart? mode and to prepare the filenames in a little different way.