Forums / Developer / Pagination in 3.4.1

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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 Exponential?

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 X

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}

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