Conditional class in Marko JS Template
<p>I am using the <code>layout</code> taglib to <em>extend</em> a page to its template but i don't know how to pass a variable to the main layout and apply a conditional class.</p>

<p>Considering this is my <code>main-layout.marko</code></p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body class="#### (TITLE === 'REGISTER')?'ACTIVE':'INACTIVE' ####"&gt;
    &lt;layout-placeholder name="title"/&gt;
    &lt;layout-placeholder name="body"/&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>this is my <code>registration.marko</code></p>

<pre><code>&lt;layout-use template="./layout.marko"&gt;
    &lt;layout-put into="title"&gt;
      $data.title
    &lt;/layout-put&gt;
    &lt;layout-put into="body"&gt;
      some content
    &lt;/layout-put&gt;
&lt;/layout-use&gt;
</code></pre>

<p>and finally this is the code I use to render the page and pass the title data</p>

<pre><code>router.get('/register', function(req, res, next) {
  registration.render({
    title: 'register'
  }, res);
});
</code></pre>

<p>How can I create a conditional class on the <code>main-layout.marko</code> file that switches between <em>active</em> or <em>inactive</em> depending on the page title?</p>

<p>Thanks</p>