Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Custom sidebar on pages

2»

Comments

  • @medelsvensson said:
    Where would I add that code? The: $this->MasterView = 'your-view';

    look in
    plugins/CustomPages/default.php

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • if you get to the defaults.php

        // Use the default css if not viewing admin master
        if ($MasterView != 'admin') {
            $Sender->ClearCssFiles();
            $Sender->AddCssFile('style.css');
        } else {
            $Sender->AddSideMenu('plugin/page/default/admin');
        }
    switch ($Page) {
      case 'home':
        $Sender->MasterView = 'front';
        break;
    
      default:
        $Sender->MasterView = $MasterView;
        break;
    } 
    $Sender->Render($Path.$Page.'.php');
    

    You can just use a switch case to select your custom view. my page here is called home.php and the view front.master.tpl

Sign In or Register to comment.