How does Joomla decide which module is supposed to be visible on a particular menu/web-page? I mean we only put the RE-WRITED URL in the browser and it automatically determines which menu it belongs to and accordingly displays the modules assigned to that very menu. Which file controls all this?

I see that <jdoc:include type="modules" name="position-name" /> is replaced by the (code of) modules assigned to a particular menu on (say) position-name in template index file.

But what makes it do that? Just curious to know where the actual magic happens.


The following are sequence of steps occur when you invoke a url:

  1. Joomla will split the url into parts separated by "/", each part (apart form website name itself) is alias of a menu item, an article or something else which will be known later.

  2. Now you have all parts of url available, the first part shall be alias of your menu item, second could be your submenu item and so on.

  3. It will match the longest possible path from all parts of your url. Each menu item will have its path (from its parent menu) and is stored in your xxx_menu table.

  4. From the above menu information, it will find corresponding component.

  5. Now it will route respective component to handle the request.

Hope it is clear.

  • can you mention the files where all this happens? – saibbyweb Feb 28 '17 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.