Forums / Setup & design / How do you display an Object which is not the main object.

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 ;-)

eZ debug

Timing: Jan 18 2025 19:25:47
Script start
Timing: Jan 18 2025 19:25:47
Module start 'content'
Timing: Jan 18 2025 19:25:48
Module end 'content'
Timing: Jan 18 2025 19:25:48
Script end

Main resources:

Total runtime0.8488 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 589.7422180.7969
Module start 'content' 0.00730.6765 770.5391572.8516
Module end 'content' 0.68380.1649 1,343.3906337.3359
Script end 0.8487  1,680.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5019210.0002
Check MTime0.00170.1952210.0001
Mysql Total
Database connection0.00110.131410.0011
Mysqli_queries0.773791.14872030.0038
Looping result0.00220.26162010.0000
Template Total0.820696.720.4103
Template load0.00220.261120.0011
Template processing0.818496.413620.4092
Template load and register function0.00010.016110.0001
states
state_id_array0.00100.112910.0010
state_identifier_array0.00200.235720.0010
Override
Cache load0.00190.2272330.0001
Sytem overhead
Fetch class attribute can translate value0.00110.129930.0004
Fetch class attribute name0.00170.201070.0002
XML
Image XML parsing0.00090.107530.0003
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00190.2226270.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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