Textpattern CMS support forum
- From: Vilnius, Lithuania
- Registered: 2009-06-14
- Posts: 120
Is it possible to set this attribute of
article_custom a bit more precisely? I would like such meaning:
- excerpted=“1” — articles with excerpt,
- excerpted=“0” — no excerpt,
- excerpted=”“ (unset, default) — all articles.
The situation is quite trivial. I’d let owners (not myself) to quickly publish very short messages (with no description, no excerpt) among others in News section. These short messages are visible on a general section of announces as a list items, not linked to its individual pages. While normal reports are excerpted and linked from the same section page. I’ve made the form, TxP works fine:
<dl><txp:article limit="25"> <txp:if_excerpt> <dt><strong><txp:permlink><txp:title /></txp:permlink></strong> — <txp:posted /></dt> <dd><txp:excerpt /></dd> <txp:else /> <dt><strong><txp:title /></strong> — <txp:posted /></dt> <dd><txp:body /></dd> </txp:if_excerpt> </txp:article></dl>
Not so simple in a search form yet. Because articles on another five sections are not excerpted, too (it is sufficient to describe them by meta description, keywords). The
txp:article has no
section attribute to exclude them, and
if_section is not sensitive in default search context. An
article_custom could be
excerpted="0", although it would mean “all”, not “no”. And
else cannot help in this context — or maybe I do not know how?
Last edited by Vienuolis (2017-11-05 14:05:23)
- Plugin Author
- From: France
- Registered: 2008-07-24
- Posts: 781
Vienuolis wrote #307648:
<txp:article>has no section attribute to exclude them, and
<txp:if_section>is not sensitive in default search context.
<txp:if_article_section> help (docs)?