Back to Top

How to set Module Position in Joomla

If you are working with Joomla, You have to know about Module Position because its basic functionality you have to use within a template. Sometimes we need to create a new module position in a Joomla template.Module Position is necessary to display modules into the template.

In Joomla, You have to know about Module Position because its basic feature you have to use within a template. even you need to add the new position for new Joomla site.Module Position is necessary to display modules into the template

There are two ways to load the modules in Template of Joomla.

  1. Without Conditions
  2. With conditions

First of all, To load Module without condition in template, you just need to add below line of code:

Conditional Module position is specifically useful when you want to have a different layout.Like on some specific condition, you want to load the module.

To load Module with the condition, you have to use if() statement of PHP before you load the module.

Let’s have a look how to count the number of a single module, you can execute a method like:

You can use the same method to count the multiple modules like this:

In above code, the countModules() function will help you determine enabled modules within a template reference on the current page.

I hope this post will help you. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. Nice weblog right here! Additionally your site so much up very fast! What web host are you using? Can I am getting your affiliate hyperlink to your host? I want my website loaded up as quickly as yours lol

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to backup MySQL database in PHP

Posted on 11 years ago

Bhumi