Majkl Najt
|
Saturday 21 August 2004 12:04:38 pm
HI! Does this code below work? I cannot make it work with latest eZ Publish? I tried it, but no succes. I debuged, but $node.node_id is unset. I have simple folder with articles in it, and now I want to have some kind of news history, 10 news per page with navigator. How can I acoomplish this? Thanks! Majkl
{let numberOfObjects=10}
{let articleCount=fetch( 'content', 'list_count',
hash( 'parent_node_id', $node.node_id ) )}
{let articleList=fetch( 'content', 'list', hash( 'parent_node_id', $node.node_id,
'sort_by', $node.sort_array,
'offset', $view_parameters.offset,
'limit', $numberOfObjects ) )}
{section name=articleLoop loop=$articleList}
{node_view_gui view=element content_node=$articleLoop:item}
{/section}
{include name=navigator
uri='design:navigator/google.tpl'
page_uri=concat( '/content/view/full/', $node.node_id, '/' )
item_count=$articleCount
view_parameters=$view_parameters
item_limit=$numberOfObjects}
{/let}
{/let}
{/let}
|
Björn Dieding@xrow.de
|
Sunday 22 August 2004 5:27:46 am
The code looks about fine... Ask yourself followign questonis
Does $node exists at all?
Are you using this code inside a content/view(also override) template? Did you create a View element? Will it help to get the node_id from $module_result?
{let numberOfObjects=10
articleCount=fetch( 'content', 'list_count',
hash( 'parent_node_id', $node.node_id ) )
articleList=fetch( 'content', 'list', hash( 'parent_node_id', $node.node_id,
'sort_by', $node.sort_array,
'offset', $view_parameters.offset,
'limit', $numberOfObjects ) )}
{section name=articleLoop loop=$articleList}
{node_view_gui view=element content_node=$articleLoop:item}
{/section}
{include name=navigator
uri='design:navigator/google.tpl'
page_uri=concat( '/content/view/full/', $node.node_id, '/' )
item_count=$articleCount
view_parameters=$view_parameters
item_limit=$numberOfObjects}
{/let}
Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/
|