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.

eZ debug

Timing: Jan 18 2025 22:13:57
Script start
Timing: Jan 18 2025 22:13:57
Module start 'layout'
Timing: Jan 18 2025 22:13:57
Module start 'content'
Timing: Jan 18 2025 22:13:57
Module end 'content'
Timing: Jan 18 2025 22:13:57
Script end

Main resources:

Total runtime0.5923 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.1641152.6406
Module start 'layout' 0.00660.0027 741.804739.4766
Module start 'content' 0.00930.5813 781.2813535.3828
Module end 'content' 0.59060.0017 1,316.664112.1250
Script end 0.5922  1,328.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5339160.0002
Check MTime0.00120.2106160.0001
Mysql Total
Database connection0.00110.191010.0011
Mysqli_queries0.543891.8203570.0095
Looping result0.00050.0852550.0000
Template Total0.561094.720.2805
Template load0.00210.347220.0010
Template processing0.559094.378220.2795
Template load and register function0.00010.022810.0001
states
state_id_array0.00080.140510.0008
state_identifier_array0.00150.249720.0007
Override
Cache load0.00160.2736280.0001
Sytem overhead
Fetch class attribute can translate value0.00050.089120.0003
Fetch class attribute name0.00120.202840.0003
XML
Image XML parsing0.00050.089020.0003
class_abstraction
Instantiating content class attribute0.00000.001540.0000
General
dbfile0.00140.2358150.0001
String conversion0.00000.001440.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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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