Answers.Body: <p>If you have a <a href="https://craftcms.com/docs/categories-fields" rel="nofollow">Categories field</a> on your entry called <code>myCategoryField</code>, you can check if it has any Categories selected by going:</p>
  
  <pre><code>{% if entry.myCategoryField | length %}
      There are categories selected!
  {% endif %}
  </code></pre>
  
  <p>If you want to loop through all of the selected categories for that field, you can do:</p>
  
  <pre><code>{% if entry.myCategoryField | length %}
      &lt;ul&gt;
          {% for category in entry.myCategoryField %}
              &lt;li&gt;{{ category.title }}&lt;/li&gt;
          {% endif %}
      &lt;/ul&gt;
  {% endif %}
  </code></pre>
  
  <p>For more info you can read more in the <a href="https://craftcms.com/docs/categories-fields#templating" rel="nofollow">templating section</a> of the Categories field's documentation.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-12T03:21:30.393Z
Answers.LastActivityDate: 2016-08-12T03:21:30.393Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm building my first site with Craft, so this is a bit newbie question.</p>
  
  <p>I've build a category with a some fields.
  How can I output all fields form the selected category on the current entry?</p>
  
  <p>Thank you very much.</p>
  
Tags: <category>
Title: How do I output all field values from a Category on the current entry?
ThreadText: # How do I output all field values from a Category on the current entry?
  
  (Asked by: username_0 on 2016-08-12)
  
  I'm building my first site with Craft, so this is a bit newbie question.
  
  I've build a category with a some fields.
  How can I output all fields form the selected category on the current entry?
  
  Thank you very much.
  
  **Tags:** category
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-12. Score: 2
  
  If you have a [Categories field](https://craftcms.com/docs/categories-fields) on your entry called `myCategoryField`, you can check if it has any Categories selected by going:
  
  ```
  {% if entry.myCategoryField | length %}
      There are categories selected!
  {% endif %}
  
  ```
  
  If you want to loop through all of the selected categories for that field, you can do:
  
  ```
  {% if entry.myCategoryField | length %}
      <ul>
          {% for category in entry.myCategoryField %}
              <li>{{ category.title }}</li>
          {% endif %}
      </ul>
  {% endif %}
  
  ```
  
  For more info you can read more in the [templating section](https://craftcms.com/docs/categories-fields#templating) of the Categories field's documentation.
  
  
  ---
  
  