Jump to content

Navigation Help


Leiserson

Recommended Posts

If you aren't planning on using the default phpvms navigation there are a few things to consider when making your custom navigation bar.

How to check if the user is logged in:

<?php
if(Auth::LoggedIn())
{
?>
INSERT NAVIGATION LINKS HERE
?
<?php
}
?>

How to Check if a user is not logged in:

<?php
if(!Auth::LoggedIn())
{
?>
INSERT NAVIGATION LINKS HERE
?
<?php
}
?>

How to check if a user is an administrator:

<?php
if(Auth::UserInGroup('Administrators'))
{
?>
INSERT NAVIGATION LINKS HERE
?
<?php
}
?>

Also remember to keep in mind that when linking to different pages,modules etc. there are a few more things to consider:

What is phpvms's url structure:

http://yoursite.com/index.php/ModuleNameHere

-The main URL is followed by an index.php no matter what page you are navigating too, with the exception of the Admin Panel.

-The Module name follows the/index.php/

So say i wanted to navigate to the login page, I would navigate to...

http://yoursite.com/index.php/Login

Echoing your sites URL:

<?php
echo SITE_URL
?>

Using this in a common link:

<a href="<?php echo SITE_URL?>/index.php/ModuleNameHere">Link Text Here</a>

Link to comment
Share on other sites

×
×
  • Create New...