Having (Next/Previous) link and page numbers (1 2 3 ... 12) in different templates

Author Message

David Dorninger

Monday 27 December 2010 1:19:28 am

Hi.

I'd like to have the (Next/Previous) links and the page numbers (1 2 3 ... 12) in different templates. I already had a look at the google.tpl template and also found the previous/next-switch block, but I seem to miss certain values that block needs. Any ideas?

Thanks, Dave.

Edi Modrić

Monday 27 December 2010 2:12:34 am

Hi David,

it's pretty straightforward, google.tpl needs 4 parameters to make it work out of the box.

Here's an example:

Parameters are as follows:
page_uri - the url of the page where you would like the navigator to be shown. For nodes, it's $node.url_alias for example
item_count - total count of the items you with to page through
view_parameters - used to pass any existing view parameters you might have
item_limit - how much items is displayed per page

{include uri='design:navigator/google.tpl'
 page_uri=$node.url_alias
 item_count=$count
 view_parameters=$view_parameters
 item_limit=$limit}

eZ Publish certified developer

http://ez.no/certification/verify/350658

David Dorninger

Monday 27 December 2010 2:31:50 am

Hi Edi.

Thanks for your reply. I get all the parameters fine, that's not the problem. The trouble is that I would like to split the paging useage into 2 templates. I of course have a template where i call the google navigator template and it works fine there.

I could call the google.tpl two times and just delete the things I dont want to see in each template, but that looks like a poor solution to me ;)

Edi Modrić

Monday 27 December 2010 2:58:19 am

Sorry for misunderstanding David!

I don't think that google.tpl is designed for something like that. You can split the template in two parts, why not. I don't think it's a poor solution.

eZ Publish certified developer

http://ez.no/certification/verify/350658

David Dorninger

Monday 27 December 2010 3:50:40 am

Well it works :) Thanks

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