How can I create dynamic paths for asset uploads? Basically I want my structure to be like so;
company-name-slug
company
logo-1.jpg
image-2.jpg
products
product-image-1.jpg
services
service-image-1.jpeg
service-image-2.jpeg
I have a field called gallery for the above assets.
Then I have sections for company, products and services. Each section uses the gallery field. Products and Services uses a related content field for the company (called company).
I want to use the gallery field across all sections, but then set the dynamic paths per service/product and company inline with the above structure.
Here is what I have tried but it just errors out. I have tried various combinations and some work some don't, but I cannot get to desired structure.
{% section == 'Company' ? slug : company.one|kebab %}/{section|kebab}
How can I achieve this or is there a way I can inject some better twig logic into the subfolder field?