Tuesday 02 March 2004 1:04:56 pm
I am setting up some code to display a random image background. The images are to be pulled from a folder (#522) within the Media section. As I am using CSS, I need the path to the original version of the image, but am not able to generate it as simply as I would like. The code:
{let SiteTitleHeader=fetch(content,tree,hash(parent_node_id,522,
class_filter_type,include,
class_filter_array, array(5)))|shuffle}
{attribute_view_gui attribute=$SiteTitleHeader.0.data_map.image image_class=original}<br />
1. {$SiteTitleHeader.0.data_map.image.url_alias}<br>
2. {$SiteTitleHeader.0.data_map.image[original].url_alias}<br>
3. {$SiteTitleHeader.0.data_map.image.content[original].full_path}
{/let}
The shuffle function works perfectly, a random image is pulled each time. But, for some reason I cannot display the path to the image which is what I really need. I am running 3.3. Any ideas are appreciated! Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|