RevCMS PHP Navigation with switch and case?

Results 1 to 3 of 3
  1. #1
    Account Upgraded | Title Enabled! C0R3G4M3R is offline
    MemberRank
    Aug 2012 Join Date
    GermanyLocation
    218Posts

    config RevCMS PHP Navigation with switch and case?

    I try to make a skin and I want to use PHP for the navigation and that's my code for the me.php:

    PHP Code:
    <?php
        
    require('inc/top.php');

        switch(
    $_GET['id']) {
            default:
                include(
    'inc/me.php');
            break;
            case 
    'staff'
                include(
    'inc/staff.php');
            break;
            case 
    'stats':
                include(
    'inc/stats.php');
            break;
            case 
    'news':
                include(
    'inc/news.php');
            break;
        }

        require(
    'inc/bot.php');
    ?>
    and that's the navigation in top.php:

    PHP Code:
    <ul class="menu">
        <
    li class="item"><a href="?id=me">{username}</a></li>
        <
    li class="item"><a href="?id=staff">Staff</a></li>
        <
    li class="item"><a href="?id=stats">Statistics</a></li>
        <
    li class="item"><a href="?id=news">News</a></li>
    </
    ul
    The problem:
    It's working if I try it with localhost/app/tpl/skins/[my skin]/me.php?id=stats but not with localhost/me?id=stats. I mean it's showing only the default inc/me.php on every link.


  2. #2
    HostSavor.com Lewislol is offline
    MemberRank
    Jul 2013 Join Date
    498Posts

    Re: RevCMS PHP Navigation with switch and case?

    With the way RevCMS works you would have to do something like http://localhost/index.php?url=me&id=stats then rewrite it to be more user friendly with your htaccess/web.config.

  3. #3
    Account Upgraded | Title Enabled! C0R3G4M3R is offline
    MemberRank
    Aug 2012 Join Date
    GermanyLocation
    218Posts

    Re: RevCMS PHP Navigation with switch and case?

    Quote Originally Posted by Lewislol View Post
    With the way RevCMS works you would have to do something like http://localhost/index.php?url=me&id=stats then rewrite it to be more user friendly with your htaccess/web.config.
    Thank you :)



Advertisement