03-19-2017, 07:20 AM
sire, check the original navigation.php file. There you have <php> code for showing content only to certain groups (like showing admin dashboard only to admins)
![[Image: Navigation.PNG?dl=0]](https://www.dropbox.com/s/h0ftlo548p6dbeo/Navigation.PNG?dl=0)
Code:
<pre></pre>
This code should be somewhat familiar with navigation.php. Try to add yourself <ul> and <li> classes and check if you can get the navigation you want. You should only change the navigation.php file in usersc/includes folder NOT in users/includes!
Also check bootstrap navbar to see how you can easily make navigation with buttons, links, dropdown menus and combine these two codes together.
Code:
<pre>
Code:
<!-- Here goes navigation for every visitor (logged, not logged, admins, not admins... -->
<!--------------------------------------------------------------------------------------->
<?php if($user->isLoggedIn()){?>
<!-- Here goes navigation only for logged visitors ----------------------------------->
<!------------------------------------------------------------------------------------>
<?php if (checkMenu(2,$user->data()->id)){?>
<!-- Here goes navigation only for admins (visitors with permission level 2) ------>
<!--------------------------------------------------------------------------------->
<?php }?>
<?php if (checkMenu(1,$user->data()->id)){?>
<!-- Here goes navigation only for users (visitors with permission level 1) ------->
<!--------------------------------------------------------------------------------->
<?php }?>
<?php }else{?>
<!-- Here goes navigation only for users who are not logged in ----------------------->
<!------------------------------------------------------------------------------------>
<?php }?>
This code should be somewhat familiar with navigation.php. Try to add yourself <ul> and <li> classes and check if you can get the navigation you want. You should only change the navigation.php file in usersc/includes folder NOT in users/includes!
Also check bootstrap navbar to see how you can easily make navigation with buttons, links, dropdown menus and combine these two codes together.