> How do I get the node ID of the parent node of the current
> node?
>
> I want to achieve the following:
> In a full view template of an article, I want to show
> "related articles", ie. articles about the same topic. The
> "topic" is the parent node of the articles, so I want a list
> of all children for the parent node of the current node
> (current article).
>
> fetch(content,list,hash(parent_node_id,[...insert statement > here...]))
Thank you, Bruce.
In addition, I found the following message very helpful... so if anyone has a similar problem: http://developer.ez.no/forum/message/14007/
> Thank you, Bruce.
> In addition, I found the following message very helpful...
> so if anyone has a similar problem: > http://developer.ez.no/forum/message/14007/
Of interest to get the grandparent id {$node.parent.parent_node_id}
> Of interest to get the grandparent id
> {$node.parent.parent_node_id}
>
> Bruce
Really nice solution.
But i meet another strange effect.
Yes, I can see $node.node_id, $node.parent_node_id etc... - BUT ! only first time , before cache wasn't created.
I have to clean cache for correct reflection and on second and next times i have nothing till the cache will be cleaned again .
(winXP, ProcessCaching=disabled) Did you have the same thing ?
> > > so if anyone has a similar problem:
>
> > Of interest to get the grandparent id
> > {$node.parent.parent_node_id}
> >
> > Bruce
> Really nice solution.
> But i meet another strange effect.
> Yes, I can see $node.node_id, $node.parent_node_id etc... -
> BUT ! only first time , before cache wasn't created.
> I have to clean cache for correct reflection and on second
> and next times i have nothing till the cache will be cleaned
> again .
> (winXP, ProcessCaching=disabled) > Did you have the same thing ?
Am seeing this now that I have turned on caching. It seems that the $node variable is not availaiable to the cached page.
> > > > so if anyone has a similar problem:
> >
> > > Of interest to get the grandparent id
> > > {$node.parent.parent_node_id}
> > >
> > > Bruce
> > Really nice solution.
> > But i meet another strange effect.
> > Yes, I can see $node.node_id, $node.parent_node_id etc...
> -
> > BUT ! only first time , before cache wasn't created.
> > I have to clean cache for correct reflection and on
> second
> > and next times i have nothing till the cache will be
> cleaned
> > again .
> > (winXP, ProcessCaching=disabled)
> > Did you have the same thing ?
>
> Am seeing this now that I have turned on caching. It seems
> that the $node variable is not availaiable to the cached
> page.
>
> Did you find a solution to this?
>
> Cheers > Bruce
You can use the {$module_result.node_id} for fetch functions. This will also work on cached pages.