3 ms·
(this comment probably isn't that interesting to anyone here, but it's an expression of how this article was useful for me, take it as a thank you :) That's ki
by johnnyworker 3y ago
(this comment probably isn't that interesting to anyone here, but it's an expression of how this article was useful for me, take it as a thank you :)
That's kinda what the sidebar is in my CMS is, which I settled on 11 years ago. I just skip the search part, or you could say I treat everything as a search (of either all nodes or the subnodes of the node currently viewed). Think wordpress tag clouds with taxonomies, and authors; If you click a tag, you'll all nodes with that tag, and the sidebar now shows only the tags and authors of nodes that have the currently tag. "Drilling down" would be too big a word here, because you can only have one tag and one author selected, but that's the basic idea. All author/tag is put into the URL parameters of relevant links, so you can e.g. use pagination or click an author and not lose the tag you initially selected.
I was kinda proud of it, but the code is horrible so I'm working on the successor, and this article got me thinking: I already plan on having more complex filters with AND, OR and nesting ("show all nodes that have author A and either tag X or tag Y, but not both tags, with tag Z" etc), but I probably totally generalize this, instead of implementing it for the stuff where it "makes sense" (tags, authors) to me now.
Because in some spots it might make sense to allow grouping nodes by title, or if they're a link, by the domain they point to, etc. images could be grouped by width, and it would be great to not have to care about that now, if I can just make it work with any metadata a node can have, be it "on" the node or in other tables that need to be joined, and make it configurable which properties are displayed and can be filtered for by default, plus a way for users to look at and filter by all the properties any of the nodes currently displayed have. Keep it simple, right?
- adambsilver 3y agoI found it interesting and I’m glad the article was useful for you.