title: Smarty conditional inside a tag
body: <p>I want to create an attribute in a an  just if a condition applies. Say I have a condition in a var like this: $mycondition.</p>
  
  <p>I am trying to do:</p>
  
  <pre><code>&lt;a {if $mycondition} attribute = "test" {{/if}} href="..."&gt;link&lt;/a&gt;
  </code></pre>
  
  <p>How would I do this?</p>