"Redirect to main_node" settings

Author Message

Damien Pobel

Thursday 31 August 2006 7:08:50 am

For SEO, having a document accessible by multiple URLs is bad. eZ publish should have an option (in settings) making the system redirect to the url of the main node with a permanent redirect.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Matthew Carroll

Tuesday 21 November 2006 9:20:36 pm

Very good idea. This functionality should be fairly easy to accomplish by checking the current url within the template level and using the Redirect Operators extension to redirect from system to virtual url if necessary:

http://ez.no/community/contribs/template_plugins/redirect_operators

I agree it would be a nice option to have as an ini setting (and this would be a more appropriate place for it than a template hack.) Perhaps you could post this as a feature request on http://issues.ez.no

Matthew

http://carroll.org.uk

Xavier Dutoit

Wednesday 22 November 2006 1:09:45 am

Hi,

You can also "hide" the fact that you have a page in several locations.

On my view line.tpl I often do a

{$node.object.main_node.url_alias}

instead of the

{$node.url_alias}

So when I list the children on a page, the link goes to the main location of any child.

Works quite ok.

X+

http://www.sydesy.com

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 11:00:34
Script start
Timing: Jan 18 2025 11:00:34
Module start 'layout'
Timing: Jan 18 2025 11:00:34
Module start 'content'
Timing: Jan 18 2025 11:00:34
Module end 'content'
Timing: Jan 18 2025 11:00:34
Script end

Main resources:

Total runtime0.4381 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 587.9141152.6250
Module start 'layout' 0.00480.0029 740.539139.4453
Module start 'content' 0.00770.4290 779.9844581.4688
Module end 'content' 0.43660.0014 1,361.453112.1563
Script end 0.4380  1,373.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.6905160.0002
Check MTime0.00130.3001160.0001
Mysql Total
Database connection0.00080.176710.0008
Mysqli_queries0.384887.8289590.0065
Looping result0.00050.1119570.0000
Template Total0.405292.520.2026
Template load0.00240.537120.0012
Template processing0.402891.950120.2014
Template load and register function0.00020.042910.0002
states
state_id_array0.00140.323010.0014
state_identifier_array0.00160.361520.0008
Override
Cache load0.00200.4602220.0001
Sytem overhead
Fetch class attribute can translate value0.00090.197730.0003
Fetch class attribute name0.00090.201560.0001
XML
Image XML parsing0.00360.827230.0012
class_abstraction
Instantiating content class attribute0.00000.002260.0000
General
dbfile0.00320.7233280.0001
String conversion0.00000.002040.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs