Pagination in 3.4.1

Author Message

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 [email protected]

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/

Majkl Najt

Sunday 22 August 2004 5:42:48 am

HI!

I was trying to do it on my own, so without /content/view.
But now i solved it already.

THanks for help anyway.

Majkl

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.