[tw5] Idea: filter links

I was typing some wikitext and hit a situation where it felt as if there exists a direct solution in TW… but it doesn’t. I wanted to create a link that, when clicked, opens a filtered list of titles. Phrased in another way; it would be a filter with a label, that is clickable to access the filter output.

This pseudo code should give the idea (even if the syntax doesn’t exist):

[[pretty label||my filter]]

Yes, it is ambiguous what I mean with “to open” the list. Maybe some kind of temporary tiddler is opened listing the titles? Or maybe the actual filtered tiddlers are opened? Maybe a setting to specify which of those two outcomes?

Regardless, it should be doable with a macro but as I was typing it just felt as if it was obvious that I could type a filter straight away with a pretty label.

I don’t think filtered transclusion could do it because the template it repeated for each output item, i.e

{{{ [tag[HelloThere]] ||mytemplate}}}

…yeah, just sharing some thoughts…

<:-)

1 Like

G’day Mat,

When clicking on the link showing “pretty label”, you want a related filter to show the resulting links in some tiddler that appears in the story river ?

Maybe a silly question: why wouldn’t you want the results of the filter to show right there where you clicked ?

I suppose I ask that because I can’t stand bouncing around, but I am curious if you have an interesting workflow going on (versus a straight-forward and always-a1 personal preference.)

Thanks for your input.

Maybe a silly question: why wouldn’t you want the results of the filter to show right there where you clicked ?

That is definitely an idea. As I noted in my post, I was not sure what should actually happen and I think your idea is neat also… but one could question why one would want the label/link there to begin with then, instead of just the list straight away? (It does remind me of my ol’ StretchText concept.)

I can’t really generalize it into “a workflow”. The idea came up as I was typing some wikitext and it felt like it would have been a natural feature in that very context… so I just felt it was justified to share to perhaps spark interesting ideas.

On a more general note; I do find that links occasionally need to do more than just navigate. For example, there are times when a link should open a specific tab in a tiddler. We are advised to use buttons disguised as links for such stuff but I can’t help bug feel the ubiquitous [[link]] is somehow under exploited.

<:-)

There’s definitely something brewing in that sponge of yours. Not sure what it is, I’m thinking it is big and complicated, definitely interesting, maybe not all that easy to verbalize.

Not quite sure what questions to ask to draw my own picture in my head that matches the picture in your head.

But if you don’t mind me sounding like a naysayer when I’m just really poking and prodding to figure out what you’re thinking …

A link is a wonderous thing. It is simple, and it does what it does. Why overload it with other purposes?

Buttons are great for invoking actions, maybe complex processing.

Making buttons look like links: very nice because it makes the button look less heavy visually, and a link just seems to beg (even more so than a button) a user to click on it (even if just to discover what it does).

User-experience: So there’s some interesting cognitive / user-interface-design stuff going on re buttons as link-look-alikes. I suppose from user experience perspective, having links behave as buttons or other things, no biggie.

But from a “programming” perspective (i.e. editing the “code”), it needs to be quick and clear that something is indeed a link that takes us somewhere, versus something else is a button that performs some more “complicated” actions. A button could be setup to behave like a simple link, but that seems like a heavy solution for what a simple link can do.

I’m rambling. I must have needed it…