CodeIgniter Forums
routing problems - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10)
+--- Thread: routing problems (/showthread.php?tid=90614)



routing problems - NathanNever - 04-10-2024

Hello everyone
they put me on a half-completed project, done in codeIgniter 3.1.10
I'm not clear on the system's routing logic, and I would like some help understanding it
basically I have this link in a menu


PHP Code:
<?php if (in_array('consulting_shd'$this->modules)) { ?>
                                                    <li><a href="consulting_shd"><i class="fal fa-file-spreadsheet"></i>SHD</a></li>
<?php ?>




already exists, which works perfectly, call the module called consulting_shd in modules

I replicated the module, in another called consulting_shdprice and created the html part in the menu



PHP Code:
<?php if (in_array('consulting_shdprice'$this->modules)) { ?>
                                                    <li><a href="consulting_shdprice"><i class="fal fa-file-spreadsheet"></i>SHD price</a></li>
<?php ?>


but in $this-modules it doesn't find consulting_shdprice, and if I remove the control and click directly on the link it redirects me to the home page


what am I doing wrong? what can I check?
Thank you in advance, and sorry for my English