Forums / Developer / How can I redirect to full view of another node?

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

eZ debug

Timing: Jan 18 2025 20:56:12
Script start
Timing: Jan 18 2025 20:56:12
Module start 'content'
Timing: Jan 18 2025 20:56:13
Module end 'content'
Timing: Jan 18 2025 20:56:13
Script end

Main resources:

Total runtime0.6951 sec
Peak memory usage4,096.0000 KB
Database Queries58

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.8438180.8125
Module start 'content' 0.00600.6819 768.6563540.4766
Module end 'content' 0.68790.0071 1,309.132842.0703
Script end 0.6950  1,351.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4414140.0002
Check MTime0.00140.1982140.0001
Mysql Total
Database connection0.00070.104210.0007
Mysqli_queries0.646192.9492580.0111
Looping result0.00110.1560560.0000
Template Total0.665595.720.3327
Template load0.00180.260120.0009
Template processing0.663795.482220.3318
Template load and register function0.00020.034710.0002
states
state_id_array0.00100.139510.0010
state_identifier_array0.00120.169120.0006
Override
Cache load0.00150.2185280.0001
Sytem overhead
Fetch class attribute can translate value0.00090.124020.0004
Fetch class attribute name0.00170.245640.0004
XML
Image XML parsing0.00060.084420.0003
class_abstraction
Instantiating content class attribute0.00000.002040.0000
General
dbfile0.00270.3909170.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs