Howdy. While trying to set up some templates to load images from a directory based on the current site section (as pulled from the menu manager via a custom tag), I have run into an issue with the admin template parser.
The problem is that at page edit time, the image list for {content_image} is loaded via the _display_image_block() method in "./lib/classes/contenttypes/Content.inc.php". I am not sure where this is called from (I am new to this codebase) but the problem is that the "dir" argument is not parsed as other Smarty template vars are.
This means that the following attempt to pass a dynamically generated directory name fails:
Code: Select all
{content_image block="image1" label="left image" dir="images/static/$mySectionAlias"}
The problem is that the _display_image_block() method is getting passed the literal string "images/static/$mySectionAlias" instead of the parsed value. Anyone know whether what I am trying to do is impossible or is there a way to pass a dynamic value for the dir argument of {content_image}? My goal is try to limit what images are presented to something specific to the site section without having to create a bunch of extra templates with hard-coded paths.
Any help appreciated.
Cheers