Sunday 10 October 2004 1:29:09 pm
Hi Lior, I understand your problem quite clearly and it has been discussed in the past here. To me it is still .. ahum ... a design flaw in ez publish. The current implementation of the additional locations and the (non)inheritance of sections makes it behave just as a link, nothing more. Now, I'm pretty sure you can work around this in the templates, but it is not straight forward. Since you delved arleady quite deep into ezpublish, this is what I would do if you followed the traditional approach to have folders as containers for children (it is actuallay an approach which will be included in the next update of the ez book): <i>make an override template for your folder which fetches your children as usual, but instead of using the url_alias to create the links to your "full object view", create a link to your main folder with additional url arguments on what to display</i> For example, Say your library node and additional locations is as follows with your effective siteaccess as other main trees in your site:
<library> <siteaccess a> <siteaccess b>
<item1> <item1> <item2>
<item2> <item3> <item3>
<item3> <item4>
<item4>
The re-appearance of items under siteaccess1 and siteaccess2 mean their alternate locations. For simplicity, assume these items are all articles of the same class. Now, for siteaccess1 you can create a full view template for the article class called for example article_view_full_a.tpl. The trick is now to assign this to a "custom" view mode, say "full_a" in your override.ini tied to the siteaccess a. Note that you are not limited to traditional line/view/embed views in ezp :-) Similar for siteaccess2, where you create another alternative full view to your article class. Now for your folder view templates in the various siteaccesses, create overrides that will take into account the above. It should be something like this (the simpliest for clarity, but it is the principle that counts):
{*override for a folder view mode full*}
{section show=$view_parameters.show}
{* we are called with the request for a full view *}
{let thisnode=fetch(content,node,hash(node_id,$view_parameters.show)}
{node_view_gui viewmode="full_a" content_node=$thisnode}
{/let}
{section-else}
{* we need to display a list of children *}
{let children=fetch(content,list,hash(parent_node_id,$node.node_id))}
<ul>
{section loop=$children var=child}
<li><a href=concat($node.url_alias,'/(show)/',$child.node_id)|ezurl}>{$child.name}</a></li>
{/section}
</ul>
{/section}
hth -paul
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|