title: Shopify (liquid) - add class to div if page template is equal to
body: <p>Is this possible? I'm working on an existing website and I need to overwrite some styles but only on pages that use my new templates as overwriting the main styles might break the other pages. This is the markup:</p>
  
  <pre><code>&lt;div id="page"&gt;
  
    &lt;main role="main" id="MainContent"&gt;
       {{ content_for_layout }}
     &lt;/main&gt;
  
     {% section 'footer' %}
  
  &lt;/div&gt;
  </code></pre>
  
  <p>So adding a class to the page or <code>main</code> element would be ideal.</p>
  
  <p>I've managed to achieve this with an <code>if</code> statement to display content but only on a certain template, like this:</p>
  
  <pre><code>{% if template == 'page.job-detail' %}
      &lt;!-- CODE HERE --&gt;
  {% endif %}
  </code></pre>
  
  <p>Not sure how that'd work in relation to classes on a div? There's probably a few pages I'd need to include so an array or a way I was specify multiple templates would be ideal. Templates like "page.faq", "page.jobs", "page.job-detail".</p>