I am running CMSMS 2.1.2, CGSimpleSmarty, CGContentUtils and CGExtensions installed.
I have a number of products that are broken down into sub sections, sometimes 4 levels deep. I have created page structure and URLs that replicate the categories etc...
(eg. example.com/products/rootcategory/category/subcategory/productname/)
I have uploaded the images for these to example.com/uploads/images/products/rootcategory/category/subcategory/productname/
Each product has multiple images.
I am trying to use {content_image} tag in the template to allow the CMS user to select the page image they want from the directory of that specific item, rather than having a massive long list of file names to pick from.
If I hard code in the dir parameter within the content_image tag, it works perfectly, however if I obtain the directory structure via smarty
Code: Select all
{cms_selflink href=$page_alias assign='dir'}
{$dir|replace:'http://example.com':'images' assign='dir'}
Code: Select all
{content_image block='page_thumb' dir="{$dir}"}
or
{content_image block='page_thumb' dir=$dir}
and no matter what I have tried, I run into a brick wall.
Any help/ideas to try would be very gratefully received!
Thanks in advance
Marc
==============
FYI
What I am trying to achieve is to assign the chosen image on the page to a content block that can be fetched by it's parent page (via CGSimpleSmarty) to show a list of all of the sub page thumbs.
I've actually got this functionality working when the dir param is hard coded, but obviously this isnt going to be possible for every page.