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.