I’m using this library but it has given me more headaches then a framework should.
For one, I have used htaccess to remove index from the url but for some reason the language the user has selected doesn’t show in the links to the other pages any more either. Let me enlighten this with an example:
I have a menu with the following item:
<li <?php if (($this->uri->segment(2))== $menu[1]) echo 'class="active"';?> ><a href="<?php echo $menu[1]?>"><?php echo ucfirst($menu[1])?></a></li>
the variable
$menu[1]
comes from the controller and contains a string with the name of the menu item, in this case it’s either ‘activities’ or ‘activiteiten’, depending on what language the user selected (english or dutch).
The link to that page is the same as the name, again, either ‘activities’ or ‘activiteiten’.
but here is the problem, when I hover over it and see the entire path, the language segment isn’t shown and when I click it, it goes to the page but in the default language, english.
Why is this? I know that it once went to the correct page, before I used .htaccess.
Of course when I use the anchor object/variable/whatever, it works without having to specify the language.