Hotaru Docs

 [həʊdɒks]

Hiding the Sidebar

In some cases, you may wish to hide the sidebar from view.

The Hotaru object has a sidebars property which is either true or false. You can change the value like this:

Open /content/themes/YOUR_THEME/index.php and put this right at the top, after the comment block :

<?php $h->sidebars = false; ?>

That will hide the sidebar in the default theme.

It will only work if your theme's index.php file includes the ability to hide the sidebar, like the default theme does.

Of course, you don't want to hide the sidebar for every page, so you'll need to include a condition. For example, if you want to hide the sidebar on the login page, do this:

<?php if ($h->pageName == 'login') {
    $h->sidebars = false;
} ?>

If you want to hide the sidebar on both the login and register pages, you might do this:

<?php if (($h->pageName == 'login') || ($h->pageName == 'register')) {
    $h->sidebars = false;
} ?>

If there are more pages you want to hide the sidebar on, the best way is with a switch statement, like this:

<?php switch ($h->pageName) {
    case 'login':
    case 'register':
    case 'account':
    case 'comments':
        $h->sidebars = false;
        break;
    default:
        $h->sidebars = true;
} ?>
Getting StartedDesign and LayoutPlugin DevelopmentAdvanced TopicsFunction ReferenceTroubleshooting