Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
article tag more comprehensive logic
Not sure if these are possible without a plugin like smd_if, but I think it’s about time the article tag allowed better logic with operators…
- partial matches:
contains="partial-value1, partial-value2"
- not:
myCustomField="!value1,!value2"
- or:
myCustomField1="value1" myCustomField2="value2" operator="or"
Offline
Re: article tag more comprehensive logic
Well, boolean search logic is an issue inside TXP core search :)
Well, boolean OR search logic is missing everywhere :)
Well, boolean NOT search logic is missing everywhere :)
Core full text search logic at least covers partial matches.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: article tag more comprehensive logic
Values really shouldn’t have special attributes, as it affects what you can use as value (or adds some very confusing escaping) and in some cases could cause potential security issues if the values are passed from a client. If anything, keywords and operators should be used with the attributes and handled by tag parser globally instead of by tag functions. I.e. as XML stylish attributes;
<txp:foo not:bar="value" />
<txp:foo or:bar="value1" or:bar="value2" />
Should be noted that both break backwards compatibility. In my opinion this should at most happen in the next major release, where hopefully the tag parser features tag registering ability, supports mapping classes (both static and non-static), class methods as tags, among other things. Magic tags ftw.
As far as partial searches go, these might need some optimization and improvements to indexing and generated queries. Ability to use different data types would be a start.
These very confusing attribute structures, delimiters and what have should be left to roaming plugins like rah_replace, rah_function, smd_wrap etc. Core has the ability to introduced seamless, standardized attribute structure, and functionality which would ideally be handled at the parser level.
Last edited by Gocom (2012-01-03 19:25:23)
Offline
Re: article tag more comprehensive logic
Yeah, I was just getting tired of using the article tag as a big dumb “present everything” tag then using smd_if to sort it all out.
I thought perhaps some of that advanced functionality mi ht be useful to others out of the box. But you certainly wouldn’t want it to break backwards compatibility.
Last edited by mrdale (2012-01-03 21:47:47)
Offline
Re: article tag more comprehensive logic
Yes, filtering a too large set of results also buggers up pagination. While it’s not an answer to your query, would soo_article_filter be of any help with this scenario. IIRC it comes at the cost of an extra query though.
Last edited by jakob (2012-01-03 22:46:30)
TXP Builders – finely-crafted code, design and txp
Offline
Re: article tag more comprehensive logic
I use TxP hack for it.
This hack goes beyond the concept TxP, but it allows to optimize sql queries and can not install the extra plugins.
Upd: plugin aks_article see attribute where
Last edited by makss (2016-03-25 05:59:13)
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)
Offline