Share » Forums » Setup & design » {if...

{if $node.object.main_node.parent_node_id|eq ( '554' )} ?

{if $node.object.main_node.parent_node_id|eq ( '554' )} ?

Friday 09 May 2008 3:43:44 am - 3 replies

Author Message

Felix Laate

Friday 09 May 2008 4:27:32 am

Hi John,

try

{if eq( $node.object.main_node.parent_node_id, 554 )}
    <p> this is 554 </p>
{/if}

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Gaetano Giunta

Friday 09 May 2008 4:29:29 am

Not sure about the intended results, but if you fetch the main_node of the current object you might not be identifying the actual node being viewed - eg. in case the given object is published at two different locations. Why not just use $node.parent_node_id?

Principal Consultant International Business
Member of the Community Project Board

John Kazakis

Friday 09 May 2008 4:49:07 am

Felix, that worked fine. Thanks.

Simple syntax error?

I have a content class(reports), this class is used throughout the site and it's also present in certain member-only pages.

However there is a Free Reports section that also uses this same class, so I want to allow people to download these reports only in that section.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu