Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Counting Articles in Article Lists
Is there anyway to find the total number of articles in an article list.
If there isn’t a way in Textpattern does anyone know the PHP / mySQL to get a total of live articles for a section or a comma separated list of sections.
Thanks
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: Counting Articles in Article Lists
Hi geoff, mdn_count works for me…
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Counting Articles in Article Lists
Thanks Colak
I’ll take a look.
I did find a way using article_custom with a crazy limit and a form containing one line …
<txp:adi_calc name=“article_count” add=“1”/>
Obviously setting the variable to 0 before the article_custom tag.
Cheers Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: Counting Articles in Article Lists
It’s a bit hackish, but <txp:search_result_count />
prints the article count even if the article list is not the result of an actual search… Caveat: This is no official endorsement to rely on this behaviour for eternity.
Offline
Pages: 1