Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with AdminLTE body class! #66

Open
thearabbit opened this issue Mar 11, 2016 · 5 comments
Open

Problem with AdminLTE body class! #66

thearabbit opened this issue Mar 11, 2016 · 5 comments

Comments

@thearabbit
Copy link

I would like to add <body class="hold-transition skin-blue sidebar-mini">, but don't work with blaze layout.

// Main Layout
<template name="AdminLTELayout">
   <body class="hold-transition skin-blue sidebar-mini">
   .............................
   </body>
</template>

// Flow Router
FlowRouter.route('/', {
    name: 'home',
    title: 'Home',
    action: function (params, queryParams) {
        BlazeLayout.render('AdminLTELayout', {content:'Home'});
    }
});

Please help me.

@gibson
Copy link

gibson commented Mar 11, 2016

you dont need to set body as template - create empty html file and write
<body class="hold-transition skin-blue sidebar-mini"></body>
and
Add following code inside on the top of one of your client side JS file:

BlazeLayout.setRoot('body');

@thearabbit
Copy link
Author

Thanks for your reply, but I would like to add some class="hold-transition skin-blue sidebar-mini" to the body.
How to...?

@pbatey
Copy link

pbatey commented Dec 16, 2016

This worked for me:

Template.myTemplate.onRendered(function() {
  $('body').addClass('hold-transition skin-blue sidebar-mini')
})

@thearabbit
Copy link
Author

Now it work fine, but have problem with event click on Navigation Bar.
How to attach event?

@pbatey
Copy link

pbatey commented Dec 19, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants