Answers.Body: <p>Without knowing what your field handles are, this is the gist of how you’d do it:</p>
  
  <pre><code>{#
     Loop through each block within your Matrix field,
     assigning them to a `block` variable:
  #}
  
  {% for block in entry.myMatrixField %}
  
      {#
         Loop through each category within this Matrix block,
         assigning them to a `category` variable:
      #}
  
      {% for category in block.myCategoriesField %}
  
          {#
             Output the plain text field value:
          #}
  
          &lt;p&gt;{{ category.myPlainTextField }}&lt;/p&gt;
  
      {% endfor %}
  
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-06T11:38:55.100Z
Answers.LastActivityDate: 2015-01-06T11:38:55.100Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>I'm new to craft so this is a bit newbie question.</p>
  
  <p>I have a category group with a set of categories, each category has a plain text field associated with it. The category group is then used as a field in a Matrix so the user can select one of the categories in the group. Basically all I want to do is list the plain text field from the selected category onto the page. </p>
  
  <p>I tried working something out from <a href="https://craftcms.com/docs/relations" rel="nofollow noreferrer">https://craftcms.com/docs/relations</a> (Going through a matrix section) but I just kept breaking everything. Any assistance would be appreciated!</p>
  
  <p>Thanks.</p>
  
Tags: <matrix><categories>
Title: How do I output the value of a field from a Category selected from a Matrix?
ThreadText: # How do I output the value of a field from a Category selected from a Matrix?
  
  (Asked by: username_0 on 2015-01-06)
  
  I'm new to craft so this is a bit newbie question.
  
  I have a category group with a set of categories, each category has a plain text field associated with it. The category group is then used as a field in a Matrix so the user can select one of the categories in the group. Basically all I want to do is list the plain text field from the selected category onto the page.
  
  I tried working something out from <https://craftcms.com/docs/relations> (Going through a matrix section) but I just kept breaking everything. Any assistance would be appreciated!
  
  Thanks.
  
  **Tags:** matrix, categories
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-01-06. Score: 2 | Accepted answer
  
  Without knowing what your field handles are, this is the gist of how you’d do it:
  
  ```
  {#
     Loop through each block within your Matrix field,
     assigning them to a `block` variable:
  #}
  
  {% for block in entry.myMatrixField %}
  
      {#
         Loop through each category within this Matrix block,
         assigning them to a `category` variable:
      #}
  
      {% for category in block.myCategoriesField %}
  
          {#
             Output the plain text field value:
          #}
  
          <p>{{ category.myPlainTextField }}</p>
  
      {% endfor %}
  
  {% endfor %}
  
  ```
  
  
  ---
  
  