Override node with another node

Author Message

Ivan Švogor

Tuesday 18 January 2011 2:30:45 am

Hello,

Is it possible to override node with another node? Say my user asks for node 2, and I display node 55.. Is there a way to do this?

H-Works Agency

Tuesday 18 January 2011 4:17:39 am

Maybe using ezpublish url rewrite module.

Say your user asks for /content/view/full/250 and you serve /content/view/full/300.

EZP is Great

Nicolas Pastorino

Tuesday 18 January 2011 5:09:14 am

Hi Ivan,

If it is only about node 2, you can use the following configuration directive (site.ini) :

[SiteSettings]
IndexPage=/content/view/full/55/ 
DefaultPage=/content/view/full/55/

If the scope of your question is larger, you may have to use niftier tricks. An option could be to develop a custom template operator, placed in the template used for node 2 (in your example), which redirects (Location header for instance) to the other node.

Let us know how things go,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Ivan Švogor

Tuesday 18 January 2011 7:43:06 am

Thanks folks.. That answers my question! :)

Igor Vrdoljak

Thursday 20 January 2011 10:50:30 pm

Also, if you just want to redirect to another node (from whatever template you want), there are a few extensions that provide you with a redirect operator that you can use in your template code:

http://www.netgen.hr/eng
http://twitter.com/ivrdoljak

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 04:29:56
Script start
Timing: Jan 18 2025 04:29:56
Module start 'layout'
Timing: Jan 18 2025 04:29:56
Module start 'content'
Timing: Jan 18 2025 04:29:58
Module end 'content'
Timing: Jan 18 2025 04:29:58
Script end

Main resources:

Total runtime1.8756 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9141152.6250
Module start 'layout' 0.00600.0030 740.539139.4688
Module start 'content' 0.00891.8648 780.0078642.4453
Module end 'content' 1.87380.0018 1,422.453112.1641
Script end 1.8755  1,434.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.1859160.0002
Check MTime0.00130.0703160.0001
Mysql Total
Database connection0.00100.055410.0010
Mysqli_queries1.813896.7054680.0267
Looping result0.00100.0519660.0000
Template Total1.838398.020.9191
Template load0.00190.103320.0010
Template processing1.836397.906420.9182
Template load and register function0.00020.011410.0002
states
state_id_array0.00170.090610.0017
state_identifier_array0.00270.143520.0013
Override
Cache load0.00160.0860270.0001
Sytem overhead
Fetch class attribute can translate value0.00070.036040.0002
Fetch class attribute name0.00140.074380.0002
XML
Image XML parsing0.00200.105340.0005
class_abstraction
Instantiating content class attribute0.00000.001080.0000
General
dbfile0.00150.0793290.0001
String conversion0.00000.000540.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
2content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 10

Time used to render debug report: 0.0002 secs