Forums / Setup & design / images in menus depending on node

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

images in menus depending on node

Author Message

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