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

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

eZ debug

Timing: Jan 18 2025 02:20:22
Script start
Timing: Jan 18 2025 02:20:22
Module start 'content'
Timing: Jan 18 2025 02:20:23
Module end 'content'
Timing: Jan 18 2025 02:20:23
Script end

Main resources:

Total runtime0.8926 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.0938180.7891
Module start 'content' 0.00760.7753 768.8828560.8047
Module end 'content' 0.78290.1097 1,329.6875337.6484
Script end 0.8926  1,667.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4616210.0002
Check MTime0.00150.1688210.0001
Mysql Total
Database connection0.00110.119710.0011
Mysqli_queries0.826292.55642000.0041
Looping result0.00160.18341980.0000
Template Total0.865697.020.4328
Template load0.00210.234120.0010
Template processing0.863596.740620.4318
Template load and register function0.00010.011810.0001
states
state_id_array0.00090.102210.0009
state_identifier_array0.00070.073020.0003
Override
Cache load0.00180.1989270.0001
Sytem overhead
Fetch class attribute can translate value0.00110.126630.0004
Fetch class attribute name0.00090.101260.0002
XML
Image XML parsing0.00090.096130.0003
class_abstraction
Instantiating content class attribute0.00000.001770.0000
General
dbfile0.00230.2618270.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs