title: How to render two attributes if variable is set?
body: <p>I'm very new to ruby templating and am trying to figure ut a best-practice for rendering attributes.</p>
  
  <p>I get my values from a yaml file, for example:</p>
  
  <pre><code>about:
      itemtype: SoftwareApplication
  </code></pre>
  
  <p>I then output them using the function t:</p>
  
  <pre><code>t(about.itemtype)
  </code></pre>
  
  <p>(about happens to be the page_class for the page)</p>
  
  <p>What I want to do is output two attributes:</p>
  
  <pre><code>&lt;div itemscope itemtype="http://schema.org/SoftwareApplication"&gt;
  </code></pre>
  
  <p>If the item type is set. Otherwise, I don't want to output anything. </p>
  
  <pre><code>&lt;div&gt;
  </code></pre>
  
  <p>I understand I could do an inline if-statement, but is there a cleaner way of doing this?</p>