Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Article search field Easter eggs?
If I want to search for articles with a status of Draft, I can:
- select the dropdown header
- select the ‘Toggle all/none’ checkbox
- select the ‘Status’ checkbox
- select the ‘Search articles’ field
- type
Draft
- press Enter or select the magnifying glass
This works. It’s six steps. Is it possible (or viable, or unreasonable, or whatever else) to:
- select the ‘Search articles’ field
- type
status:draft
- press Enter
…and see the same result? Perhaps a similar route with less mousing / tapping involved for keyboard jockeys like me? I can’t be alone in this.
This feels like it should already be possible with some sneaky option that’s not well-known…
Any advice or feedback from the Textpattern hivemind most gratefully received!
Offline
Re: Article search field Easter eggs?
With our supercharged Search/Filter class this is eminently doable and something I have thought about to a greater or lesser degree and then forget.
I don’t like the overly clicky clicky nature of the search either. Coupled with that, when you initiate a search from another panel – e.g. click an Article count from the Sections panel – it changes the dropdown (which is nice) but keeps it that way for future searches (which may be deemed unexpected). Thus if you use any of the other links and then try to perform a subsequent search it will do so within only the field that you last used.
To some degree, I do like that the search keeps the previous setting for future searches. Though other times I wish it wouldn’t. Guess it’s one of those things we have to live with as we can’t have both easily.
Anyway, my thoughts about this proposal are:
- By implication, it renders any existing search checkboxes inoperative. So if you have ‘section’ and ‘category’ selected in an article search and type in
status: draft
then it would consider all articles. That could actually be considered a positive feature as a shorthand way to bypass the dropdown, reducing the annoyance mentioned above. - Whatever we choose as delimiter (colon seems logical, as you suggest) will piss off people who want to search for things containing that delimiter. Granted, it would only apply if the thing preceding the colon is the name of a database column, but even so. Potentially unexpected for people who don’t know about the Easter egg feature.
- Combinations are tricky. What happens if someone uses
status: draft section: products
? Is that an OR situation? Find me all articles of status draft OR in section products? Would"status:draft section: products"
treat it as AND? If so, we’d have to split the search terms up if they are in ‘verbatim’ double quotes and see if any contain{something}:
that matches a DB field, then apply them all as filters. - Further to the above, would a different syntax be better than double quotes, thus retaining their use for verbatim searches? So, I dunno,
{status:draft section: products}
would group those terms as an AND? But then, what would be the expected outcome of{status:draft section: products} category: marvel spiderman
? Draft articles in the products section OR articles with one of their categories = marvel, either of which contain the term ‘spideman’?
Not saying it can’t be done. I’m sure it can, and I’d use it. We just need to decide its scope and proceed from there to make it the most useful feature.
Last edited by Bloke (2021-08-02 15:00:29)
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
#3 2021-08-02 17:53:06
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,301
Re: Article search field Easter eggs?
Would it be feasible that non-English speakers can type their own language for “status” and “draft” etc?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Article search field Easter eggs?
I’ll open I have opened an issue so we can track. I’ve lost count of the number of times this has come up in my head and then I’ve forgotten about it.
github.com/textpattern/textpattern/issues/1722
Last edited by gaekwad (2021-08-03 09:17:29)
Offline
Pages: 1