Forums / General / How to set up offset and limit .................need help

How to set up offset and limit .................need help

Author Message

sangib das

Wednesday 23 August 2006 3:48:38 am

Hi All
I have a folder named News . In that folder i have 20 article.
In the frist page i set to dispay only 6 article. Now my problem is that if i select 4 no article
then it will diplay 4 no article plus next five articles such 5,6,7,8,9 ahain if i choose
7 article it will again dispay 7,8,9,10,11,12
is it possible.if pls i need help.
Thanks

Claudia Kosny

Wednesday 23 August 2006 11:12:17 am

Hello sangib das,

unfortuntately I am not to clear on what you actually want to achieve.
If you click on article number 4 you should not see the folder template at all but the template for your article. Therefore I am not sure what your problem really is.
So please post again with a remore detailed description of you want to achieve, what you have done and what is happening.

Generally offset and limit work like this:
You have 20 articles in your folder alltogether.
As you want to display only 6 articles at a time the value for limit is 6.
The offset changes each time, it marks the number of the first item you want to see.
The first time you want to see all nodes from 0 until 5, thus the offset is 0.
The second time you want to see all nodes from 6 to 11, thus the offset is 6,
Then the nodes from 12 to 17, meaning offset 12
and last 18 until 19 (which is the last one), thus offset is 18.

You can use the google navigator to tell the template which offset to use.

Claudia

eZ debug

Timing: Jan 19 2025 07:16:43
Script start
Timing: Jan 19 2025 07:16:43
Module start 'content'
Timing: Jan 19 2025 07:16:43
Module end 'content'
Timing: Jan 19 2025 07:16:43
Script end

Main resources:

Total runtime0.1509 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 590.4922180.8203
Module start 'content' 0.00550.0061 771.312593.8047
Module end 'content' 0.01150.1393 865.1172522.6719
Script end 0.1509  1,387.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00301.9915200.0002
Check MTime0.00120.7802200.0001
Mysql Total
Database connection0.00070.481010.0007
Mysqli_queries0.107070.91231410.0008
Looping result0.00110.75101390.0000
Template Total0.139092.110.1390
Template load0.00070.451210.0007
Template processing0.138391.664810.1383
Override
Cache load0.00040.270310.0004
Sytem overhead
Fetch class attribute can translate value0.00090.601710.0009
XML
Image XML parsing0.00020.152310.0002
General
dbfile0.00634.1645200.0003
String conversion0.00000.004130.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs