Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
search_result_count ignores 'offset' attribute of txp:article[_custom]
doArticles determines the count of articles by adjusting for an optional offset
attribute: $total = safe_count('textpattern',$where) - $offset;
(publish.php rev. 1192, line #602).
txp:search_results_count uses $total
without catering for the offset: $t = $thispage['total'];
(taghandlers.php rev. 1188, line #1283).
So an article list with interstitial ads will give a search results count which is off by -offset
.
<txp:article status="live" limit="1" pageby="5" />
<txp:output_form form="adsense" />
<txp:article status="live" limit="4" pageby="5" offset="1" />
<txp:if_search>
<p>Your search term was found <txp:search_result_count text="times." /></p>
</txp:if_search>
//w&
Offline
#2 2006-01-12 22:30:07
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: search_result_count ignores 'offset' attribute of txp:article[_custom]
Thanks. Give r1213 a try.
Alex
Offline
Re: search_result_count ignores 'offset' attribute of txp:article[_custom]
Bug squashed. Thanks!
Last edited by wet (2006-01-13 20:52:06)
Offline