Cannot display Objects that are in multiple locations.

Author Message

Michel Houtermans

Friday 30 January 2004 8:17:33 am

I created a few objects in a folder and add the same objects to a second folder via the "Add Locations" option.

Now I created a line view override template for the second folder but the objects that are in there are not shown in the line view override that I wrote. They are visible though use the standard template.

To test that my override really worked I actually created a new object in the second folder (so now I have an original on this spot). This did show the object with the override template but it also showed the other objects with the standard template.

Why is this? What do I need to do to show the other objects with the override template? A different fetch maybe?

Marco Zinn

Friday 30 January 2004 12:52:17 pm

Strange. Fetch does usually not care, if it's the "main node" or not.
If you just changed the line view templates, this does not affect the fetch function, as the fetch is done in the folder's full view template...
Did you create a new class?
Can you print the new line view templae here?

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

Michel Houtermans

Friday 30 January 2004 1:19:42 pm

This is my full view tpl:

<div class="page_title">Trading Log</div>

<table width="100%" class="radar_trade">
<tr class="radar_trade_header">
<td class="radar_trade_header_cell">Symbol</td>
<td class="radar_trade_header_cell">Name</td>
<td class="radar_trade_header_cell">Market</td>
</tr>

{* Grab some of the content of the node that is being viewed. *}
{let children=fetch( content,
list,
hash( parent_node_id, $node.node_id,
sort_by, $node.sort_array,
class_filter_type, include,
class_filter_array, array( 'security' ) ) )}

{* LOOP: For each child of the node... *}
{section name=Child loop=$children}

{* Display the content of the child using a line-view template. *}
{node_view_gui view=line content_node=$Child:item}

{* End of loop. *}
{/section}

</table>

+++++++++++++++++++++++++

And this is my line view tpl:

<tr class="radar_trade_row">
<td class="radar_trade_row_cell">
<a href={$node.url_alias|ezurl}>
{attribute_view_gui attribute=$node.object.data_map.symbol}
</a>
</td>
<td class="radar_trade_row_cell">
{attribute_view_gui attribute=$node.object.data_map.name}
</td>
<td class="radar_trade_row_cell">
{$node.object.data_map.market.content.name}
</td>
</tr>

+++++++++++++++++

This strange thing is the original in the second folder is displayed correctly. But the other ones are displayed right before the Table definition using the standard layout.

Michel Houtermans

Saturday 31 January 2004 12:58:48 am

The original objects in folder 1 belong to the node of folder 1. When I added the object via the Add Locations to folder 2 they still belonged to the node of Folder 1. So when I want to display them in folder 2 I need the node of folder 1 and not folder 2 I think.

Now the question is, is this normal behavior, and just the way it works, or not?

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 31 2025 06:28:25
Script start
Timing: Jan 31 2025 06:28:25
Module start 'layout'
Timing: Jan 31 2025 06:28:25
Module start 'content'
Timing: Jan 31 2025 06:28:25
Module end 'content'
Timing: Jan 31 2025 06:28:25
Script end

Main resources:

Total runtime0.0130 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.3750151.2422
Module start 'layout' 0.00560.0020 739.617236.7109
Module start 'content' 0.00760.0044 776.328194.1875
Module end 'content' 0.01190.0011 870.515633.9922
Script end 0.0130  904.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002317.3833140.0002
Check MTime0.00107.3734140.0001
Mysql Total
Database connection0.00085.933510.0008
Mysqli_queries0.002518.837830.0008
Looping result0.00000.084210.0000
Template Total0.00086.110.0008
Template load0.00064.535610.0006
Template processing0.00021.588110.0002
Override
Cache load0.00043.190910.0004
General
dbfile0.00085.939080.0001
String conversion0.00000.047640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs