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.