Answers.Body: <p>It seems that setting a child category also sets it's parents categories too (top level being first, and selected child category is last).</p>
  <p>Able to get the category with <code>{{ asset.categoryField.all()|last.title }}</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T16:44:53.453Z
Answers.LastActivityDate: 2022-03-01T16:44:53.453Z
Answers.UserDisplayName: Jaytrix
Body: <p>I have an asset volume that has a category field. The category field has no max level so I can have parent/child categories.
  If I set a child category to the asset in /admin then all is well, but when I go to display the asset and category then I only get the top level (parent) category and not the child category set in /admin.</p>
  <p>Similar thing happens if I use the <code>group</code> filter, the groups are only the top level category titles.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-01T16:11:41.717Z
Comments.Text: Please post the relevant part of your Twig template that's generating the incorrect output.
Comments.UserDisplayName: MoritzLost
Tags: <assets><category><children>
Title: Asset has a child category but only displays the parent on templates
ThreadText: # Asset has a child category but only displays the parent on templates
  
  (Asked by: username_0 on 2022-03-01)
  
  I have an asset volume that has a category field. The category field has no max level so I can have parent/child categories.
  If I set a child category to the asset in /admin then all is well, but when I go to display the asset and category then I only get the top level (parent) category and not the child category set in /admin.
  
  Similar thing happens if I use the `group` filter, the groups are only the top level category titles.
  
  **Tags:** assets, category, children
  
  > **Comments:**
  > **username_1**: Please post the relevant part of your Twig template that's generating the incorrect output.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-03-01. Score: 2
  
  It seems that setting a child category also sets it's parents categories too (top level being first, and selected child category is last).
  
  Able to get the category with `{{ asset.categoryField.all()|last.title }}`
  
  
  ---
  
  