How do you display an Object which is not the main object.

Author Message

Michel Houtermans

Tuesday 10 February 2004 11:46:40 am

I created an object and added to two locations. If I want to display the object in the main location I have no problem. I just fetch the contents of the folder and it works, I create an override and it works.

Now when I go to the second folder I cannot get the same object to be displayed. The fetch simply does not work.

In the admin it looks like this:

Folder 1
-> object (node id: 137, object id: 140)
Folder 2
-> object (node id: 138, object id: 140)

The main location is folder 1. What kind of fetch do I need in folder 2 to display the object? Do I need to use the parent_node_id of folder 1 in the folder 2 template? Or how does this work?

Michel Houtermans

Tuesday 10 February 2004 12:15:29 pm

I think the problem has to do with the line view override template. Some how he does not want to display that template.

Folder 1 is section 5
Folder 2 is section 4

I now created a line view override for class 21 and section 4. But does not go in there to display the content of it. Is the wrong because of the different locations?

Marco Zinn

Tuesday 10 February 2004 1:22:44 pm

Hi, to remove possible "point of failures", I suggest, that you just use one section and one template (no overrides), until your node 138 shows up at all (if this is possible for the moment). Also, make sure, that "anonymous" can read your content class and section in any case (or log in as admin user).
The default templates do not care, if the object is in it's main node or not. The List-"Fetch", that is used, operates on "nodes", not objects, and for that, your two nodes are of the same kind. There is no "main" and "copy" or so.
So, the node should show up in the templates, just as it should show up in the admin interface.
(Note: I think, the "tree"-Fetch function does NOT send duplicate object nodes).

Marco
http://www.hyperroad-design.com

Michel Houtermans

Wednesday 11 February 2004 8:10:22 am

Ok the fetch in folder 2 works but the line view override does not want to work.

I can see the object 140 in folder 2 but as the standard line template. He refuses to take the new line view template I created for this one. It really starts to puzzle me why it does not work.

Michel Houtermans

Wednesday 11 February 2004 8:34:16 am

In Folder 1 I use the treemenu2 extension as can be found on ez publish. The treemenu represents the content of folder 1 and when you go down the tree you come eventually to the above object (140). Basically the tree is a line view of the object. When you click on the object in the tree then it opens the full view of the object. I noticed that when I click on the object in folder 2 it opens the same full view as in folder 1 for this object.

Can this treemenu2 extension be the problem?

Michel Houtermans

Wednesday 11 February 2004 12:51:20 pm

the problem seamed so hard yet it was so easy. Here is what i did wrong

Both folders were assigend a section.

Since I created the object in Folder 1, the same object in Folder 2 still belongs to the sectoin of Folder 1. Thus the override I created for folder 2 was based on the wrong section.

Fixed the section and now it worx ;-)

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:24:08
Script start
Timing: Jan 18 2025 22:24:08
Module start 'layout'
Timing: Jan 18 2025 22:24:08
Module start 'content'
Timing: Jan 18 2025 22:24:08
Module end 'content'
Timing: Jan 18 2025 22:24:08
Script end

Main resources:

Total runtime0.8411 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.6016152.6563
Module start 'layout' 0.00720.0037 742.257839.5078
Module start 'content' 0.01090.8286 781.7656567.7422
Module end 'content' 0.83950.0016 1,349.507816.0938
Script end 0.8411  1,365.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4441160.0002
Check MTime0.00150.1741160.0001
Mysql Total
Database connection0.00080.098810.0008
Mysqli_queries0.780192.7387660.0118
Looping result0.00080.0960640.0000
Template Total0.804095.620.4020
Template load0.00280.335520.0014
Template processing0.801195.244120.4006
Template load and register function0.00020.023710.0002
states
state_id_array0.00140.171510.0014
state_identifier_array0.00140.161620.0007
Override
Cache load0.00240.2844330.0001
Sytem overhead
Fetch class attribute can translate value0.00070.083120.0003
Fetch class attribute name0.00120.141770.0002
XML
Image XML parsing0.00080.091020.0004
class_abstraction
Instantiating content class attribute0.00000.001570.0000
General
dbfile0.00090.1092160.0001
String conversion0.00000.001240.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
6content/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
3content/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.0002 secs