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

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 19 2025 07:16:54
Script start
Timing: Jan 19 2025 07:16:54
Module start 'layout'
Timing: Jan 19 2025 07:16:54
Module start 'content'
Timing: Jan 19 2025 07:16:54
Module end 'content'
Timing: Jan 19 2025 07:16:54
Script end

Main resources:

Total runtime0.0145 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.2813152.6406
Module start 'layout' 0.00500.0034 741.921939.4609
Module start 'content' 0.00840.0036 781.382889.2422
Module end 'content' 0.01200.0025 870.625030.3047
Script end 0.0145  900.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.5137140.0002
Check MTime0.00117.3805140.0001
Mysql Total
Database connection0.00085.335710.0008
Mysqli_queries0.003020.290230.0010
Looping result0.00000.096710.0000
Template Total0.002215.110.0022
Template load0.00074.889710.0007
Template processing0.001510.143510.0015
Override
Cache load0.00053.212310.0005
General
dbfile0.00021.175780.0000
String conversion0.00000.064040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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