Friday 03 June 2005 3:17:57 am
I don't really understand just what your trying to do. It would help if you were to at the very least, write a brief paragraph explaining what your trying to do / accomplish / goals. Even though I don't know what your trying to do exactly. Here are a few templates I have created (don't laugh :), which I include in the pagelayout.tpl (main layout). These eZ publish templates are license solely under the GNU GPL (v2 or later). <b>Example #1 : related_links.tpl</b> This file will display related objects of the type 'link' only. {*
Related Links : Lets get our data sets
License : GNU GPL (v2 or later).
Author: kracker
*}
{let root_node=fetch( content, node, hash( node_id, $module_result.node_id ) )
related_objects=$root_node.object.related_contentobject_array
) ) }
{* If we got data, display the items *}
{section show=$related_objects}
<div id="whatsrelated">
<span class="headerw">{"Related Links"|shorten(30)}</span>
</div>
<div class="sectmain">
{section var=mini loop=$related_objects}
{* We only want to display articles in this related link list *}
{section show=eq( $mini.main_node.class_name, 'Article' ) )}
{* section-include match=$mini.main_node.class_name|eq(file) *}
<a href={$mini.main_node.url_alias|ezroot} class="mainb">{$mini.name|shorten( 25 )}</a>
{/section}
{/section}
</div>
{/section}
{/let}
<b>Example #2 : related_files.tpl</b> Here is another related object template. {* Related Files : Lets get our data sets
License : GNU GPL (v2 or later).
Author: kracker
*}
{let root_node=fetch( content, node, hash( node_id, $module_result.node_id ) )
related_objects=$root_node.object.related_contentobject_array
) ) }
{* If we got data, display the items *}
{section show=$related_objects}
<div id="whatsrelated">
<span class="headerw">{"Related Files"|shorten(30)}</span>
</div>
<div class="sectmain">
{section var=mini loop=$related_objects}
{* We only want to display articles in this related files list *}
{section show=eq( $mini.main_node.class_name, 'File' ) )}
{* section-include match=$mini.main_node.class_name|eq(file) *}
<a href={$mini.main_node.url_alias|ezroot} class="mainb">{$mini.name|shorten( 25 )}</a>
{/section}
{/section}
</div>
{/section}
{/let}
//kracker <i>Korn : Freak on a Leash</i> <i>These templates are licensed under the GNU GPL, as such you may</i> <b>not</b> <i>use these templates in anyway under the eZPL. The eZPL is a </i> <b>non-free</b> <i>license of eZ publish. Re: http://www.ez.no/ez_publish/licenses</i>
Member since: 2001.07.13 || http://ezpedia.se7enx.com/
|