Pass on boolean instead of class name to main template

feature/node-rewrite
Sven Slootweg 12 years ago
parent 225633ac1d
commit c55aef5f05

@ -255,8 +255,7 @@ $sTemplateParameters = array_merge($sTemplateParameters, array(
'logged-in' => $sLoggedIn,
'title' => $sPageTitle,
'main' => $sMainContents,
/* TODO: Return a boolean instead and use this in the template. */
'main-class' => (isset($router->uVariables['menu']) && $router->sAuthenticated === true) ? "shift" : "",
'menu-visible' => (isset($router->uVariables['menu']) && $router->sAuthenticated === true),
'generation' => "<!-- page generated in " . (round(microtime(true) - $timing_start, 6)) . " seconds. -->"
));

@ -26,7 +26,7 @@
</div>
{%/if}
</div>
<div class="main {%?main-class}">
<div class="main {%if menu-visible == true}shift{%/if}">
{%?main}
</div>
<div class="footer">

Loading…
Cancel
Save