Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Display articles only with empty category
amordecosmos wrote #328512:
Hey, that worked! Thank you.
Great, but it’s a shame one has to employ these acrobacies in 2021 for such a natural request. What should we do: allow article_custom
set pagination data? let article
alter category
and other ‘context’ attributes? something else?
Offline
Re: Display articles only with empty category
etc wrote #328513:
Great, but it’s a shame one has to employ these acrobacies in 2021 for such a natural request. What should we do: allow
article_custom
set pagination data? letarticle
altercategory
and other ‘context’ attributes? something else?
I think that it would be great to if we allow article_custom
to have pagination data. The tag already has all the other parameters, so it would just be one addition.
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: Display articles only with empty category
etc wrote #328513:
[…] allow
article_custom
set pagination data? letarticle
altercategory
and other ‘context’ attributes? something else?
The first certainly gets my vote! When amordecosmos OP popped up, my first reaction was <article_custom not category="catx" />
. But but pagination :-(
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Display articles only with empty category
colak wrote #328515:
I think that it would be great to if we allow
article_custom
to have pagination data.
phiw13 wrote #328516:
The first certainly gets my vote!
Feasible, but we’d need to enable it via some attribute, for bw-compatibility sake:
<txp:article_custom exclude category="catx" pageby />
Which looks artificial compared with
<txp:article exclude category="catx" />
What could be wrong with enhancing <txp:article />
? If category
is not set, pull it from URL as usual.
Offline
Re: Display articles only with empty category
etc wrote #328518:
What could be wrong with enhancing
<txp:article />
? Ifcategory
is not set, pull it from URL as usual.
Can’t see any downside to this. Backwards-compatible and a neat enhancement. It brings article and article_custom a little closer, too. Maybe one day we could even have the flexibility of a single <txp:article />
tag that can do everything <txp:article_custom />
can, but employs context sensitivity first as it does now. Mmmmmm.
Last edited by Bloke (2021-02-04 11:21:00)
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
Online
Re: Display articles only with empty category
etc wrote #328518:
Feasible, but we’d need to enable it via some attribute, for bw-compatibility sake:
yeah, OK. I was going with this thinking it might be easier to implement…
What could be wrong with enhancing
<txp:article />
? Ifcategory
is not set, pull it from URL as usual.
If you can work around the context-sensitivity issue, then sure!
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Display articles only with empty category
phiw13 wrote #328520:
I was going with this thinking it might be easier to implement…
It’s more straightforward, yes, but uglier too.
If you can work around the context-sensitivity issue, then sure!
The only difficulty is to decide on attribute/context interplay.
Offline
Re: Display articles only with empty category
Bloke wrote #328519:
Maybe one day we could even have the flexibility of a single
<txp:article />
tag that can do everything<txp:article_custom />
can, but employs context sensitivity first as it does now. Mmmmmm.
Well, maybe not in 4.8.5, unless all subtleties are clear. Meanwhile, it’s possible now to use <txp:article_custom />
as partial substitute for <txp:article />
:
<txp:article_custom ...some atts... pageby offset />
Offline
#21 2021-09-06 14:24:48
- peterj
- Member
- From: Melbourne, Australia
- Registered: 2005-06-02
- Posts: 101
Re: Display articles only with empty category
This thread might explain why I can’t get article_custom exclude to work how I thought it did in 4.7+. In the docs for article_custom it defines the exclude attribute like this:
exclude="article id(s) or field(s)"
Exclude a specific article or list of articles (each ID separated by a comma), or the articles with matching fields (author, category, etc.).
If this “matching field” means the field name or label, not the value, should the doc be revised to say so?
I’d been trying all manner of variations, extending to ```exclude=“field(category1, my-category)”``` and the like.
Offline
Re: Display articles only with empty category
I don’t remember exactly which one, but some combination of
match="category1" exclude="category1" category="my-category"
should work.
Offline