Always link to main location of node?

Author Message

Mark Marsiglio

Monday 15 December 2003 4:45:21 pm

I have several items that have alternate locations throughout my site. The problem is that if you click on an item that is in one of the alternate locations, the tree menu opens to that alternate location and it does not show the sub-tree items for that object.

Technically, the object has no sub-tree because it is an alternate, but if I could make the link point to the main location of the node rather than the alternate, this would not be a problem.

Is it possible to modify a link so that it points to the main location?

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Tore Skobba

Tuesday 16 December 2003 7:46:10 am

Hi

Sounds almost like a problem I had, I solved it by making templates overrides which fetched the main node children. Like this:

{let users=fetch(content,list,hash(parent_node_id,$node.main_node_id))}

{section name=usersList loop=$users}
{node_view_gui view=inline content_node=$usersList:item}
{/section}
{/let}

Then with some controll statments within your tree menu template it might work?

Like:
if (alternate_location=true) fetch main_node children
else fetch children

Then go through the list and print out name and links.
Cheers
Tore

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 19 2025 07:15:58
Script start
Timing: Jan 19 2025 07:15:58
Module start 'layout'
Timing: Jan 19 2025 07:15:58
Module start 'content'
Timing: Jan 19 2025 07:15:59
Module end 'content'
Timing: Jan 19 2025 07:15:59
Script end

Main resources:

Total runtime1.6397 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 590.3906152.6406
Module start 'layout' 0.00580.0037 743.031339.4766
Module start 'content' 0.00951.6288 782.5078525.3594
Module end 'content' 1.63830.0014 1,307.86728.1406
Script end 1.6397  1,316.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.1963160.0002
Check MTime0.00140.0843160.0001
Mysql Total
Database connection0.00140.082510.0014
Mysqli_queries1.592897.1399540.0295
Looping result0.00060.0355520.0000
Template Total1.587296.820.7936
Template load0.00220.133420.0011
Template processing1.585096.665020.7925
Template load and register function0.00010.005710.0001
states
state_id_array0.00250.153710.0025
state_identifier_array0.00240.146620.0012
Override
Cache load0.00180.1102220.0001
Sytem overhead
Fetch class attribute can translate value0.00080.050420.0004
Fetch class attribute name0.00180.110930.0006
XML
Image XML parsing0.00050.030520.0002
class_abstraction
Instantiating content class attribute0.00000.000330.0000
General
dbfile0.00070.0451150.0000
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs