title: Output entry category in ExpressionEngine
body: <p>I'm trying to output the category of a channel entry in ExpressionEngine, so that I can use it as a CSS class on an HTML element &mdash; see my attempted usage of <code>{category_name}</code> in the example below:</p>
  
  <pre><code>{exp:channel:entries 
      channel="panels"
      disable="member_data|pagination|trackbacks|categories|category_fields" 
      status="open"
      dynamic="no"
  }
  
      &lt;div class="panel {category_name}"&gt;
          &lt;h4&gt;{title}&lt;/h4&gt;
          {if panel_image}
              &lt;img src="{panel_image}" /&gt; 
          {/if}       
          &lt;p&gt;{panel_text}&lt;/p&gt;
          &lt;a href="{panel_link}"&gt;{panel_link_text}&lt;/a&gt;
      &lt;/div&gt;
  
  {/exp:channel:entries}
  </code></pre>
  
  <p>As you can see, I'm trying to use the entry's category as a CSS styling 'hook' ... but I can't figure out how to output an entry's category in my template.</p>
  
  <p>I'd prefer to avoid using PHP in my template. Does anyone know how to improve my code?</p>