Forums / Setup & design / images in menus depending on node
Zdenek Ziegler
Monday 04 April 2005 4:43:02 pm
Hi,
I need to setup ezp to display images in menus - top, bottom and left. I have a class with 3attributes "image" to store these images. Some classes don't have these attributes, so in this case, I want to display some default images.I know how to display images hard-coded in pagelayout.tpl, but don't know how to fetch it depending on node where I actually am.
Could someone help me?
Thanks,
Zdenek
Arran Price
Tuesday 05 April 2005 4:39:26 pm
We change the image dependant on node with the following (editted) code.
{set mynode=$module_result.node_id} {section show=$mynode|eq('121')} {set section_image=1176} {/section} {section show=$mynode|eq('122')} {set section_image=1177} {/section} {set sideimage=fetch( 'content', 'node', hash( 'node_id', $section_image ) ) } {attribute_view_gui attribute=$sideimage.object.data_map.image image_class=sideimage css_class=content-image-section}
Hope that helps.
Arran