1

I have a Matrix that I use for both Entries and Commerce Products. Inside of that Matrix is an Assets field.

Currently, I have {owner.parent.uri ?? owner.section.handle}/{owner.slug} which works perfectly for Entries. Assets are organised perfectly for my site.

How can I get add a check for Commerce in there? Something like:

{owner.product.type ?? owner.parent.uri ?? owner.section.handle}/{owner.slug}

Is that possible? Otherwise, do I have to use a long-hand if/else?

1 Answer 1

2

I just decided to go with {uri} for all my asset paths now. Works well :D

Your Answer

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

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