This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 2 years, 2 months ago.

Keep Sidebar Closed for most pages


  • landon
    Participant

    Posts: 5
    Member Reply #5239

    Hello,
    I’m working with the angular version and want to have the side bar closed (or completely gone would be better) for most of my pages. I have this in the main.js ‘pageSidebarClosed: true, // sidebar menu state’ which works great but how can I bring it back to individual pages?

     

    Thank you for your help!

    Sean
    Sean
    Keymaster

    Posts: 4435
    Support Staff Reply #5255

    Hi :),

    You can set the sidebar state individually for each page. For example for todo page it is set like below:

    angular.module(‘MetronicApp’).controller(‘TodoController’, function($rootScope, $scope, $http, $timeout) {

    $scope.$on(‘$viewContentLoaded’, function() {
    App.initAjax(); // initialize core components
    });

    // set sidebar closed and body solid layout mode

    $rootScope.settings.layout.pageContentWhite = true;
    $rootScope.settings.layout.pageBodySolid = true;
    $rootScope.settings.layout.pageSidebarClosed = true;
    });

Tagged: 

You must be logged in to reply to this topic.