Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-22 20:02:53

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

display number of articles after a category name

Hi all, I want to know if I can display the number of articles in a category after the article name

site: http://www.ecklesroad.com

I’d like to be able to have after each right side category links have something like “Amazing (#)” where # is the number of articles in that category.

This site is my sandbox for getting used to using textpattern, this is my second site to use it, so I’m kinda new yet.

Offline

#2 2008-02-22 20:11:25

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

Re: display number of articles after a category name

Hi ecklesroad

use mdn_count


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 2008-02-22 20:36:30

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: display number of articles after a category name

ps: although you greatly modified it, it wouldn’t hurt to leave in the credits when using a template :) don’t get me wrong… just wanted to let you know, theme creators appreciate it if people are giving credit, not neccessarily in this case but for the future :)

Last edited by sthmtc (2008-02-22 20:36:47)

Offline

#4 2008-02-22 20:40:44

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: display number of articles after a category name

colak – So in my tag <code><txp:category_list type=“article” break=“li” wraptag=“ul” sort=“Title ASC” /> </code> how would I be able to make each category show the number of articles without having to list them out one by one?

sthmtc – I didn’t want to step on anyone, I’ll try and fit it in some where. Sorry about that. I wanted to use something as a basis to start with.

Offline

#5 2008-02-22 22:02:42

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: display number of articles after a category name

ecklesroad wrote:

I didn’t want to step on anyone, I’ll try and fit it in some where. Sorry about that. I wanted to use something as a basis to start with.

no problem, didn’t want to sound stiff or anything, the comment was just meant as a friendly hint/reminder for the future, before someone is feeling stepped on :) absolutely no worries and you don’t have to fit it in, it’s fine with me…

Offline

#6 2008-02-23 14:45:22

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

Re: display number of articles after a category name

ecklesroad wrote:

colak – So in my tag <code><txp:category_list type=“article” break=“li” wraptag=“ul” sort=“Title ASC” /> </code> how would I be able to make each category show the number of articles without having to list them out one by one?

I’m not sure that you will be able to do that. Not with using txp code and plugin(s) out of the box.

You can however hard code the links of the categories and have <txp:mdn_count category="yourcategory" /> next to it.


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

Offline

#7 2008-02-23 16:45:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: display number of articles after a category name

cbs_category_list has an option to display article counts.

As of 4.0.6 there is no way to do this with default TXP tags.


Code is topiary

Offline

#8 2008-02-25 15:33:49

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: display number of articles after a category name

jsoo wrote:

cbs_category_list has an option to display article counts.

As of 4.0.6 there is no way to do this with default TXP tags.

Perfect, that’s exactly what i needed it to do, thanks!!!

Offline

Board footer

Powered by FluxBB