Answers.Body: <p>The Craft <a href="http://buildwithcraft.com/docs/categories" rel="nofollow">Categories</a> page is very useful.</p>
  
  <p>To assign an entry to a category, create a category field, and require it in the entry type (you are probably already doing this).</p>
  
  <p>When you create a <em>Category Group</em> you can edit the field layout, and add an image field and a text field for the category. Then to edit that content, double click on the category itself (from the right-side category menu), and you will get a modal dialog where you can edit the text and image.</p>
  
  <p>To list the categories in <em>myCategoryGroup</em> you do:</p>
  
  <pre><code>{% set categories = craft.category.group('myCategoryGroup') %}
  {% for cat in categories %}
    {{cat.title}} - {{cat.image}} {# assuming image is the name of the image field #
  {% endfor %}
  </code></pre>
  
  <p>Craft site has an article on <a href="http://buildwithcraft.com/help/entries-related-to-category" rel="nofollow">How do I list the entries related to a category?</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-31T08:57:49.583Z
Answers.Text: Thank you! My first issue was not realising there was a "Field Layout" tab on the category group edit page. On top of that I'm not sure I would have noticed you could "double click on the category itself".
Answers.UserDisplayName: jamus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-28T16:50:57.110Z
Answers.LastActivityDate: 2014-07-28T16:50:57.110Z
Answers.UserDisplayName: Marion Newlevant
Body: <p>I'm just getting to grips with Craft but it seems very flexible. To try it out I have set up a structure to store some sample products. These products have an image, text, tags and belong to a category (E.g cakes). I can sort and output products, display in groups even sort by tag - brilliant.</p>
  
  <p>One thing I struggling with is how assign a image and other fields to the category? So that I can then have a page with a list of categories each with an image and text Or even output a single category that I want to highlight on another page? </p>
  
  <p>Should this be a "parent" entry? If so how do I assign a set of fields to the parent item but not the child? </p>
  
  <p>Possibly I am thinking about approaching this the wrong way and I should create a "types" structure in which the entries have a required field that is the "category" and use this to search for any products of matching category?</p>
  
  <p>Confused - any pointers appreciated.</p>
  
Tags: <entries><category>
Title: Possible to assign fields (or an image) to a category?
ThreadText: # Possible to assign fields (or an image) to a category?
  
  (Asked by: username_0 on 2014-07-28)
  
  I'm just getting to grips with Craft but it seems very flexible. To try it out I have set up a structure to store some sample products. These products have an image, text, tags and belong to a category (E.g cakes). I can sort and output products, display in groups even sort by tag - brilliant.
  
  One thing I struggling with is how assign a image and other fields to the category? So that I can then have a page with a list of categories each with an image and text Or even output a single category that I want to highlight on another page?
  
  Should this be a "parent" entry? If so how do I assign a set of fields to the parent item but not the child?
  
  Possibly I am thinking about approaching this the wrong way and I should create a "types" structure in which the entries have a required field that is the "category" and use this to search for any products of matching category?
  
  Confused - any pointers appreciated.
  
  **Tags:** entries, category
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-07-28. Score: 3 | Accepted answer
  
  The Craft [Categories](http://buildwithcraft.com/docs/categories) page is very useful.
  
  To assign an entry to a category, create a category field, and require it in the entry type (you are probably already doing this).
  
  When you create a *Category Group* you can edit the field layout, and add an image field and a text field for the category. Then to edit that content, double click on the category itself (from the right-side category menu), and you will get a modal dialog where you can edit the text and image.
  
  To list the categories in *myCategoryGroup* you do:
  
  ```
  {% set categories = craft.category.group('myCategoryGroup') %}
  {% for cat in categories %}
    {{cat.title}} - {{cat.image}} {# assuming image is the name of the image field #
  {% endfor %}
  
  ```
  
  Craft site has an article on [How do I list the entries related to a category?](http://buildwithcraft.com/help/entries-related-to-category).
  
  > **Comments:**
  > **username_0**: Thank you! My first issue was not realising there was a "Field Layout" tab on the category group edit page. On top of that I'm not sure I would have noticed you could "double click on the category itself".  
  
  ---
  
  