Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-01-13 22:59:57
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
How to not display articles from 1 section in admin side articles list
I need to display some data on a page. There will be 1500 or so sets of data and each set will have several fields: name, a list of organizations, comment. I’ll need to add, edit, and delete the sets, and display a list of the sets using different sort orders on a single page on the public side.
All the functionality I need is available out of the box if I make each set a separate article.
But if make 1500 sets of data into individual articles, it’ll be hard to sort through the list on the articles page. I don’t mind that for this section (the 1500 sets of data). That’s a necessary evil, but I don’t want to make working with the other articles from other sections unbearable.
I know you can display articles from just one section. Is the opposite possible? In other words, is there a way to make the default display of articles on the articles page NOT show the articles from one section (the one with 1500 articles)? Maybe I could write a plug-in to do that?
Last edited by azw (2009-01-13 23:18:47)
Offline
Re: How to not display articles from 1 section in admin side articles list
azw wrote:
All the functionality I need is available out of the box if I make each set a separate article… Maybe I could write a plug-in to do that?
And maybe if you did that, a few hundred people who use TXPhorum would become your life-long friends :-)
If I could ‘permanently’ and arbitrarily turn off display of a section or three (but reinstate them with a click on ‘show all’ or ‘show section nnnnn’) then it’d be in my arsenal of “must haves” on TXPhorum sites, that’s for sure.
Last edited by Bloke (2009-01-14 00:00:42)
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 2009-01-14 06:34:58
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: How to not display articles from 1 section in admin side articles list
Yeah, I guess TXPhorum would create a similar situation.
Do you think that would be easy to do that plug-in?
I’ve not done a plug-in yet, but reading about it makes it sound fairly straightforward.
Offline
Re: How to not display articles from 1 section in admin side articles list
azw wrote:
Do you think that would be easy to do that plug-in?
Plugins are fairly straightforward once you’ve read the guides on Textboox/thresholdstate.
In terms of solution, I guess jQuery wouldn’t cut it because you’d not have the requisite number of records per page once the offending rows had been removed. Plus you have the flash as you see them all and then they get removed on DOM load.
So I’d guess a callback on the article list page that skips/removes any entries in the given section(s) would do it. You might need a config tab under Extensions as well, where you’d list all the sections and allow them to be shown/hidden, plus some feature on the article list tab to unhide the hidden sections.
You could probably do it all in one place on the article list tab with a UI widget or two if you set a cookie to remember the state of which sections were on/off. Then intercept the cookie in your callback, filter the results and let TXP do the rest. Not sure if you can actually just strip out the records because of the pagination thing; it would have to be done prior to that part. Hmm, slightly trickier now I think about it.
Of course, if you crack that bit, you don’t have to limit the plugin to sections. Filtering out unwanted categories or status might be useful too, if you can find a way to do it without cluttering the interface. You might consider doing the UI bit in a foldout panel via a line or two of jQuery, so it’s all hidden unless you click a link on the page which opens out the config panel. Postmaster does that and it works well.
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
#5 2009-01-15 07:48:35
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: How to not display articles from 1 section in admin side articles list
I’ve been reconsidering. What if there were a new, duplicate articles tab under Content for auxiliary data? Then your Txphorum data or my list of data sets would have a discrete home. That’s really what we need, isn’t it?
Does that sound less difficult or more?
The other thing I’ve considered doing is using the Links tab. I’d only need to change the field labels and add an additional 2 categories or maybe a keywords field.
Offline