How can I redirect to full view of another node?

Author Message

Adolfo Barragán

Thursday 30 October 2003 10:52:35 am

In my site I build a menu with a loop over folder from a node. So, the href clause is build dinamically like this: <a href={concat("content/view/full/",$Folder:item.node_id)|ezurl}> but I need the link for a certain node (e.g: 49) point to another node (e.g:63).

I try create an override template for node 49 with this sentence:
{node_view_gui view=full content_node=63}
but then I see nothing (a blank page)

What's is wrong? How can I achieve this?

Regards
Adolfo Barragán

Hans Melis

Thursday 30 October 2003 1:48:52 pm

There are various ways to achieve this, probably depending on which ezp version you're using.

With 3.2-2, you can use the URL translator to create a forwarding URL from /content/view/full/49 to /content/view/full/63.

What you're using will work too, but it needs some editing. The "content_node" attribute of node_view_gui expects a node, not just an ID. Just fetch the node, and pass it to node_view gui.

{let redirect_node=fetch('content', 'node', hash(node_id,63))}
{node_view_gui view=full content_node=$redirect_node}
{/let}

I think that should work.

--
Hans

Hans
http://blog.hansmelis.be

Adolfo Barragán

Thursday 30 October 2003 10:57:53 pm

> {let redirect_node=fetch('content', 'node', hash(node_id,63))}
> {node_view_gui view=full content_node=$redirect_node}
> {/let}

> I think that should work.

Yes, Thanks a lot
Adolfo

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