I’d like to have a snippet of text, that when inserted into a tiddler, puts the tags and title of the current tiddler plus some arbitrary static text into the body of the tiddler.
For example, if I create a tiddler with a title of ‘Fred Read’ and tags of ‘ToDo’ and ‘Reading’, I’d like
----
arbitrary starting 'ToDo' text 'Reading' 'Fred Read'
to show in the body. I don’t need links, or a table or anything fancy.
Can someone give me a very simple starting point I can build on?
Welcome!
I’m not sure, why you want to have tags and title 2 times displayed with a tiddler. The title and that tags are always at the top of the tiddler.
You can create a tiddler eg: myFooter tagged: $:/tags/ViewTemplate add a field list-after: $:/core/ui/ViewTemplate/body
title: myFooter
tags: $:/tags/ViewTemplate
list-after: $:/core/ui/ViewTemplate/body
<hr>
some arbitrary text
<$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop" join=", "/>
more text {{!!title}}
You can download and import the following tiddler into your wiki.
The tag $:/tags/TextEditor/Snippet is a special one that will add your snippet to taht dropdown. The caption field determined how the entry will look in the dropdown:
Sorry, I thought I was helping by including something that might be nice. Of course you don’t need to apply that template (if you don’t want to help make it obvious that these are tags).
To get the tags as links you can do this:
<$list filter="[<currentTiddler>tags[]]"/>
If you want these tag terms not to show as links (but just “dumb” text) you can present them within the text widget:
You could also make a tiddler that inserts this content when you type it as a function:
Make a tiddler with any title you like, tag it $:/tags/Global, and set it up something like this:
\function tag-words() Tags here at [<currentTiddler>] include [<currentTiddler>tags[]join[, ]] +[join[ ]]
(Modify however you like, or follow up to clarify your needs)
Then typing <<tag-words>> in any tiddler will give you a comma-delimited list of the current tiddler’s tags, just as plain text (with the lead-up of "Tags here at [title-of-tiddler] include ").
I’m not sure what to think, here. I just double-checked by copy-pasting the above into a new tiddler at tiddlywiki.com (adding only a newline before the second # mark, and it works fine:
Others may have more tutorial-like recommendations. Mostly, I recommend just playing around, starting with easy examples, and building gradually as you gain confidence.
The second one has failed to specify what should be shown for each item in the list. What you want to show for each item goes within the space between the opening and closing widget-tags. Put anything in there — {{!!title}} or item or <li>item</li> — and you’ll see that output for each result of your filter.
Of course, the first version doesn’t say what to show either … but Jeremy (and other developer-collaborators) often thinks of ways to make it easy for people to do obvious things. So a list widget that just closes itself (ending in />) has been set up to offer this default behavior: displaying a list of links, one for each result of the filter condition.
I just tried it going back to a v5.2.2, without trouble (though the function approach certainly depends on recent versions)
If the basic text-widget version isn’t working for you because of a version difference then you have something extremely… vintage! What version of TW are you working with??
Bah - I think I’m ready to give up.
The main thing I use TW for is with the ToDoNow plugin
The newest version of that plug in isn’t handling daily repeating tasks like the old one did, and there are other changes I’m not thrilled with either. I did get it working with the current TW, and the test you and I were working on DOES work with that version, but my todo stuff doesn’t.
I don’t know the ToDoNow plugin, but I’m pretty sure there will be folks here who can help with that, if you post a separate thread!
Wishing you the best with it. I know for my own part, TiddlyWiki makes things possible that I couldn’t even imagine when I started. But it was a learning curve!
If you are using the relink plugin update it to stop an error after the core update.
Don’t give up now. You are trying to modify an old version and as a result having problems.
The kind of thing you want do do is an everyday requirement. Solving it is just part of your learning journey.
A valuable investment in your time.
Note widgets such as $list are not JavaScript .but what I call tiddlywiki script and you need something if you want to tell any software to do such things. Tiddlywiki provides its own subset of widgets to do almost anything.