Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-12-15 21:43:23

leafy_loader
Member
Registered: 2008-09-25
Posts: 96

Get number of articles

How do you obtain the number of articles that are are about to be displayed? I then want to use that number in my own php code, so for example;

<article custom1=“home_page”>

<txp:php> echo(count($thisarticle)); </txp:php>

</article>

But this doesn’t seem to work :(

Offline

#2 2009-12-16 07:58:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,250
Website GitHub Mastodon Twitter

Re: Get number of articles

leafy_loader wrote:

How do you obtain the number of articles that are are about to be displayed? I then want to use that number in my own php code, so for example;

Hi leafy_loader

there’s a plugin for that: mdn_count or so I believe that this is what you are looking for.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-12-16 13:04:17

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Get number of articles

I use mem_article_count for this.

Offline

Board footer

Powered by FluxBB