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.

eZ debug

Timing: Jan 18 2025 05:00:42
Script start
Timing: Jan 18 2025 05:00:42
Module start 'layout'
Timing: Jan 18 2025 05:00:42
Module start 'content'
Timing: Jan 18 2025 05:00:43
Module end 'content'
Timing: Jan 18 2025 05:00:43
Script end

Main resources:

Total runtime0.8267 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.4063152.6875
Module start 'layout' 0.00660.0032 741.093839.5313
Module start 'content' 0.00980.8155 780.6250555.6797
Module end 'content' 0.82520.0014 1,336.304712.3750
Script end 0.8267  1,348.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4233160.0002
Check MTime0.00160.1908160.0001
Mysql Total
Database connection0.00120.144210.0012
Mysqli_queries0.770393.1817630.0122
Looping result0.00050.0648610.0000
Template Total0.788995.420.3945
Template load0.00240.291320.0012
Template processing0.786595.134020.3932
Template load and register function0.00020.021610.0002
states
state_id_array0.00120.143910.0012
state_identifier_array0.00400.481920.0020
Override
Cache load0.00210.2549270.0001
Sytem overhead
Fetch class attribute can translate value0.00090.112620.0005
Fetch class attribute name0.00100.126060.0002
XML
Image XML parsing0.00100.115320.0005
class_abstraction
Instantiating content class attribute0.00000.001970.0000
General
dbfile0.00230.2736160.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs