3

I'm trying to set dynamic upload locations for my asset fields that are in a Super Table field within a Matrix field. So it's Matrix > Super Table > Asset field. I'm getting the following error when I save an entry, though. Could not resolve the subpath “{owner.section.handle}/{owner.slug}”. Omitting the owner part doesn't work either.

Any ideas? Thanks!

1 Answer 1

5

Have you tried using {owner.owner.slug}? If you've got Matrix > Super Table > Asset, and you're trying to get an attribute on the Entry/Element, you'll need to go two level out from the Super Table field.

Entry
  Matrix
    Super Table
      Asset Field

The owner of the Super Table field is the Matrix field. The owner of the Matrix field is the Entry.

1
  • 1
    Thank you! It also works if you have a Matrix field within a Super Table field. This should be on the Craft CMS Documentation page, currently they only show: {owner.id} and they dont explain it as well as you just did. Thanks! Commented Jul 15, 2019 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.