Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-05-27 19:17:30
- fh
- New Member
- Registered: 2006-05-27
- Posts: 3
Bug calculation numPages with offset
See my message at http://forum.textpattern.com/viewtopic.php?id=16411
Offline
#2 2006-06-18 02:36:08
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Bug calculation numPages with offset
Try this..
In publish.php around line 629, change this:
global $thispage;
$thispage = $pageout;
..to this:
global $thispage;
if (empty($thispage))
$thispage = $pageout;
Alex
Offline
#3 2006-06-25 01:41:15
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Bug calculation numPages with offset
No one?
Alex
Offline
#4 2006-06-30 23:35:14
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Bug calculation numPages with offset
No response, so I’ll assume the solution doesn’t work.
Bug is still open with no fix available.
Alex
Offline
Re: Bug calculation numPages with offset
It doesn’t, at least not for me. I replaced this:
<code>
<txp:article sortby=“Posted” sortdir=“desc” form=“article_index_1” limit=“6” />
</code>
which outputs (correctly)
story1 – story2 – story3 – story4 – story5 – story6
with
<code>
<txp:article sortby=“Posted” sortdir=“desc” form=“article_index_1” limit=“2” />
<txp:article sortby=“Posted” sortdir=“desc” form=“article_index_1” limit=“2” offset=“2” />
<txp:article sortby=“Posted” sortdir=“desc” form=“article_index_1” limit=“2” offset=“4” />
</code>
On page 1 of the results (where I should get stories 1-6) I get:
story1 – story2 – story3 – story4 – story5 – story6 – story1 – story2 – story3 – story4 – story5 – story6
On page 2 of the results (when I should get stories 7-12) I get:
story7 – story8 – story9 – story10 – story11 – story12 – story3 – story4 – story5 – story 6 – story7 – story8
~Nick
Offline
#6 2006-07-23 00:45:40
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Bug calculation numPages with offset
Nick,
I wouldn’t expect those to work correctly, since you haven’t used the pageby attribute.
Alex
Offline
Re: Bug calculation numPages with offset
Ahhhh……
when I run it with the correct syntax, it works perfectly. Thanks, Zem !
~Nick
Offline
Pages: 1