display parent_node_id?

Author Message

Lukasz Klejnberg

Friday 07 April 2006 6:35:09 am

I have this code:

if eq( $module_result.node_id, 60)}
<img src={"urologia_dziecieca.jpg"|ezimage} width="542" height="27" border="0" alt="" />

{elseif eq( $module_result.node_id, 61)}

<img src={"glowne_choroby_ukladu_moczowo_plciowego.jpg"|ezimage} width="542" height="27" border="0" alt="" />
{/if}

In a specific folder, with a node_id=61, there are a few artilces. I would like a specific picture, which is shown in the folder with node_id=61, to be also shown in a case when the other articles from the folder are chosen.

Kåre Køhler Høvik

Friday 07 April 2006 7:10:45 am

Hi

It this code in the pagelayout or the content view ?

Kåre Høvik

Lukasz Klejnberg

Saturday 08 April 2006 1:33:08 am

Hi

in the pagelayout

Lukasz Klejnberg

Saturday 08 April 2006 3:35:18 am

I found this variable $module_result.content_info.parent_node_id so i changed code to:

if eq( $module_result.node_id, 60)}
<img src={"urologia_dziecieca.jpg"|ezimage} width="542" height="27" border="0" alt="" />

{elseif eq( $module_result.node_id, 61)}

<img src={"glowne_choroby_ukladu_moczowo_plciowego.jpg"|ezimage} width="542" height="27" border="0" alt="" />

{elseif eq( $module_result.content_info.parent_node_id, 61)}

<img src={"glowne_choroby_ukladu_moczowo_plciowego.jpg"|ezimage} width="542" height="27" border="0" alt="" />

{/if}

Now work fine :) Is this good solution?

Kåre Køhler Høvik

Saturday 08 April 2006 4:03:00 am

Hi

Thats a good solution. The code youre using there will not generate any extra/unessesary SQL calls.

Kåre Høvik

Lukasz Klejnberg

Saturday 08 April 2006 4:19:11 am

Thanks :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.