I am using a list widget to give the output based on a tag.
But I would like the output not only to list a link to that tiddler, but also a link to a potential tiddler whose title has the title of the first tiddler plus (content).
[[Birds]] [[(c)|Birds (content)]]
The first part is easy: <$link/>
I am not sure how to produce the second part. How would I grab the first title, add the word (content), then add it as a link in a list widget output?
Yeah, I had something similar in my first cut, but I didn’t like that in scenarios where the primary tiddler does not have a related " (Content)" tiddler.
I seem to have read the question slightly differently from Eric and Charlie. It sounded to me that you wanted a second (c) link if that ... (content) tiddler exists.
For that, I would use a procedure, perhaps like this:
As did I. But I also went a different way, assuming that this was something that would be used in multiple places, and that a procedure would make it easier to list create both links in a simple manner. (A macro would be similar.)
In any case, I’m glad you found something that works for you!
You can also use it inside a list: <$list filter="Birds Cats Dogs">{{||c}}</$list> or <$list filter="Birds Cats Dogs" template="c" />
Or as a template in a filtered tranclusion: {{{ Birds Cats Dogs [[Great Apes]] || c }}}
I often prefer transclusion templates for things like this because they can be both more flexible and a little more concise than macros — and they are, by definition, globally available. And, credit where credit’s due, I think I learned this trick from Charlie!