So I have my content that I put on my template article.html via the EE-publishform where I also get to choose wether to use layouts 'normal' or ' wide'. The size of the images varies depending on wich layout I use. CE_image is what I use to resize images.
problem
What I cant figure out is how to let CE_image do its work on the layout-template instead of on the article-template. Or if I could put the CE_image-tags on the article-template and then let the layout-templates insert apropriate values to size, crop and quality variables.
disclaimer
I realize Stash is a genuinly complex and competent addon and the solution to my problem is probably right there in the Stash documentation. I have read it over and over and tried things over and over but I never seem to hit the keys in the right order. So I am very ready for some advice on this matter.
Thanks /David
content
- title
- body
- images (matrix-field)
- img-1
- img-2
- img-3
Templates
Article
{exp:channel:entries channel="archive" limit="1" url_title="{segment_2}"}
{embed="_layouts/{f-archive-layout}"}
{exp:stash:set name="title"} {title} {/exp:stash:set}
{exp:stash:set name="content"} {f-body} {/exp:stash:set}
{exp:stash:set name="images"} {f-archive-images} {exp:ce_img:pair src="{f-archive-images-image}" width="400" crop="yes" quality="80"} {/exp:ce_img:pair} {/f-archive-images} {/exp:stash:set}
{/exp:channel:entries}