Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
txp:related_articles outputs label ("Related Articles")
I have this code in txp 4.9 beta:
<txp:related_articles break="" section='<txp:section link="0" title="0" />' sort="LastMod DESC">
.....<div class="resource-card <txp:category1 />">
..........<p class="category"><txp:category1 /></p>
..........<p><strong><a href="<txp:permlink />"><txp:title /></a></strong><br>
..........<txp:meta_description format="" /></p>
..........<p>Updated <txp:modified format="since" /> ago.</p>
.....</div>
</txp:related_articles>
(Leading periods just so the code would look nice.)
It generates the label “Related Articles” even though the label is unset:
Is this a bug? Or am I using the related_articles tag wrong?
Last edited by agovella (2025-06-24 04:24:00)
Offline
Re: txp:related_articles outputs label ("Related Articles")
The default is Related Articles. Set label=""
to silence it. But I wouldn’t expect it to output the label if used as a container. Hmmmm.
Last edited by Bloke (2025-06-24 06:08:37)
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
Re: txp:related_articles outputs label ("Related Articles")
Bloke wrote #339903:
The default is Related Articles.
Docs says: “Default: unset”. Hmm,I would expect no label in that case.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: txp:related_articles outputs label ("Related Articles")
Hmmm, then something has gone wonky. This may be a by-product of tweaking the global label
attribite so may well affect other tags.
Good catch. We’ll investigate.
Last edited by Bloke (2025-06-24 08:06:56)
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
Re: txp:related_articles outputs label ("Related Articles")
Thought… the issue is actually in TXP 4.8. Perhaps the code for the txp:related_articles
has a default value “Related articles”, but a naughty little gremlin hid everything including from the documentation and nobody noticed because such is the power of naughty little gremlins. But then a griot during one of its long songs deep into the night lifted the ban and unlocked it. All need to happen is to document the existence of the default value, in the same way as for example the txp:recent_articles
.
PS – the documentation is actually a little obscure as even tags with a default label have label
attr. documented as default: unset
… you have to follow the link to the cross-reference page to find out…
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: txp:related_articles outputs label ("Related Articles")
I agree. An easy documentation change fixes the issue. Adding label=”“ is pretty easy to do when using the tag.
Offline