Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-10-01 14:30:43

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Authors listings only if more than 1 author exists

Bloke wrote #326195:

Hmmm, I still get the same count out (22 in this case) when I’m expecting 21, excluding the empty row.

Well, category translates as (Category1 != '') OR (Category2 != ''), and we count distinct Category1. Is it possible that you have an article with empty Category1 but not empty Category2?

Offline

#26 2020-10-01 14:35:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: Authors listings only if more than 1 author exists

etc wrote #326196:

Is it possible that you have an article with empty Category1 but not empty Category2?

Highly probable.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#27 2020-10-01 14:39:53

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Authors listings only if more than 1 author exists

Bloke wrote #326197:

Highly probable.

Then you should query for

<txp:article_custom category match="Category1" pgonly="Category1" />

Offline

#28 2020-10-01 15:17:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: Authors listings only if more than 1 author exists

Bingo!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#29 2020-10-01 15:18:40

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Authors listings only if more than 1 author exists

I can also confirm the new functionality allows me to enable/disable multi-author features in my theme – so that’s great stuff. Thanks Oleg!

Offline

Board footer

Powered by FluxBB