title: Set a custom template variable in expressionengine
body: <p>I need to output the category for an entry a few times in an entry's template.</p>
  
  <p>So I want to get the output from the following and assign to a variable so I can reuse within the template:</p>
  
  <pre><code>{exp:channel:entries channel="product" limit="1" status="open"}
      {categories}{category_name}{/categories}
  {/exp:channel:entries}"
  </code></pre>
  
  <p>How do it do that?</p>