Modules and Components in Joomla & which banner solution to choose
I’ve received a surprising number of questions and comments from users regarding my Easy Ad Banner component and module for Joomla.
One user asked whether he should be using the module or component to display his banners - good question! For the banner system I’ve developed, the module will display one random banner on each page load. (And will look at the date to pull a current one.) The component will load every valid banner onto the page, in a random order.
A component typically puts content in the main body of the page. You’ll create a link from the menu to the component, and the contents of this component will appear when you click the menu. In our case, the component also creates the admin interface, so you will always need to use the component.
A module, on the other hand, typically sits on every page (although you can choose what pages it will appear on.) While components appear in the main body of the page, modules will typically sit in the sidebar, the header, or the footer of the page. You can’t create a menu link to a module, the way you could with a component.
So you have the following decision to make:
1) “I want the advert(s) to appear in the main body of the page and possibly create a menu link to it.”
You should download only the component. Once it is installed, sign in to the admin area, and go to Components->Advertising. Add new banner(s) as appropriate. Once that’s done, create a menu item in the usual way. The type of link should be ‘advertising->default layout’. Save your menu item, and you should now be able to see the page.
2) “I want the banner to appear on every page, or in an area of the page that is NOT the main content area.”
Follow the steps above, but don’t create a menu item. Install the module. Go to Extensions->module manager, then click on the cross next to ‘random banners’ to enable it. Click on the words ‘Random Banners’ to edit the settings of the module. From here, you can change some of the settings - which pages the module appears in, the module position (left, right, top etc) the CSS class, the title of the module, and more. As long as you’ve activated it, the module should appear in the desired position.
Hopefully this basic information will help some of you out a little bit. You can download the module and component here.