Let's say this is your menu links list :
<ul id="menulist">
<li><a href="index.php?modul=mod1" rel="mod1">Module 1</a></li>
<li><a href="index.php?modul=mod2" rel="mod2">Module 2</a></li>
<li><a href="index.php?modul=mod3" rel="mod3">Module 3</a></li>
<li><a href="index.php?modul=mod4" rel="mod4">Module 4</a></li>
<li><a href="index.php?modul=mod5" rel="mod5">Module 5</a></li>
</ul>
You can achieve what you need with a simple jquery request and another "module bringer" php file :
<script>
$(document).ready(function(){
$('#menulist li a').click(function(e){
e.preventDefault(); // This will prevent the link to work.
$('#contenuto').load('module_bringer.php?mod=' + $(this).attr('rel');); // You get the moule from rel attribute
// You should keep the actual link so bots can crawl.
});
});
</script>
Detailed Explanation Edit Below
0 - Ok. First of all you should make everything keep working without js and jquery. Bots do not crawl via a browser, they just take the source code and crawls through the code. (Assuming that you care for seo)
1 - Make an extra attribute to your menu links (in this case i've added rel attribute). The value of this attr is the module parameter value.
2 - Include jquery library (if you haven't included before - You can download it from here.
3 - You can use the second code part that i've wrote. You just need to change the triggering part. In the jquery code $('#menulist li a').click gets triggered when the explample menu items that's in the first code block. You have to change this according to your menu structure. This part is the one that makes the httprequest and puts the results into #contenuto div.
4 - You need to create another file for including the content which will be the target file of the jquery httprequest. (in this case i've named it module_bringer.php ). Contents should be like this :
<?php
// You probably need to include some files here like db connection, class definitions etc.
?>
<br />
<?php
if(empty($_GET["modul"]) && empty($_GET['userpanel'])) {
require('moduli/news.php');
}
elseif (file_exists("moduli/" . $_GET['modul'] . ".php")) {
include("moduli/" . $_GET['modul'] . ".php");}
elseif (file_exists("moduli/userpanel/" . $_GET['userpanel'] . ".php")) {
include("moduli/userpanel/" . $_GET['userpanel'] . ".php");
}else{
include("moduli/404.php");
}
?>
<br />