Answers.Body: <p>I'm not sure, but I think you might need to use <code>level</code> in your loop. </p>
  
  <pre><code>{% set categories = craft.categories.group('groupHandle').level(3) %}
  
  {% for category in categories %}
      // etc
  {% endfor %}
  </code></pre>
  
  <p>Have a look at the docs:</p>
  
  <p><a href="https://craftcms.com/docs/templating/craft.categories#level" rel="nofollow noreferrer">https://craftcms.com/docs/templating/craft.categories#level</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-14T02:42:43.093Z
Answers.LastActivityDate: 2017-09-14T02:42:43.093Z
Answers.UserDisplayName: Ryan
Body: <p>I have 2 Main Groups of Categories, which themselves have Sub-Categories.<br>
  The Categories you see have checkboxes to filter entries below.<br>
  One Sub-Group has also Children (With Material/ Without Material) ->Screenshot.<br>
  I need to collapse these two groups (on click they open/close).<br>
  <strong>How can i target these Sub-sub-Category Groups?</strong><br>
  Right now i use:  </p>
  
  <pre><code>{% ifchildren %}
   &lt;ul class="subcategory-list"&gt;
     {% children %}
   &lt;/ul&gt;
  {% endifchildren %}
  </code></pre>
  
  <p><a href="https://i.sstatic.net/KvuOa.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KvuOa.png" alt="enter image description here"></a>  </p>
  
  <p>I tried some with siblings but cannot get it to work. I also need to add extra html fot the arrow to indicate the collapse and to open the sublist.<br>
   If i add it right now, it gets added to all category-groups.<br>
  Thanks.</p>
  
Tags: <category><children>
Title: How to target Sub-Category of Sub-Category
ThreadText: # How to target Sub-Category of Sub-Category
  
  (Asked by: username_0 on 2017-09-13)
  
  I have 2 Main Groups of Categories, which themselves have Sub-Categories.  
  The Categories you see have checkboxes to filter entries below.  
  One Sub-Group has also Children (With Material/ Without Material) ->Screenshot.  
  I need to collapse these two groups (on click they open/close).  
  **How can i target these Sub-sub-Category Groups?**  
  Right now i use:
  
  ```
  {% ifchildren %}
   <ul class="subcategory-list">
     {% children %}
   </ul>
  {% endifchildren %}
  
  ```
  
  [![enter image description here](https://i.sstatic.net/KvuOa.png)](https://i.sstatic.net/KvuOa.png)
  
  I tried some with siblings but cannot get it to work. I also need to add extra html fot the arrow to indicate the collapse and to open the sublist.  
  If i add it right now, it gets added to all category-groups.  
  Thanks.
  
  **Tags:** category, children
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-14. Score: 3
  
  I'm not sure, but I think you might need to use `level` in your loop.
  
  ```
  {% set categories = craft.categories.group('groupHandle').level(3) %}
  
  {% for category in categories %}
      // etc
  {% endfor %}
  
  ```
  
  Have a look at the docs:
  
  <https://craftcms.com/docs/templating/craft.categories#level>
  
  
  ---
  
  