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