<<list-links "[tag<currentTiddler>]">>
is the answer, thx! And, why I have not saw that in the official document? Even the tiddlywiki.com source is type the title again.
\define str()
Very
"""
Long
"""
String 'where' I can have any "quotes"
\end
<$text text=<<str>> />
<$macrocall $name="cpblk" src=<<str>> />
the <<str>> can not contain ' """ ' .
@ejmoog: Here is what you are missing out... You have to use the macrocall widget instead of the macro calling shorthand syntax with <<copy-to-clipboard "text">>
. Additionally, you have to use macro parameter as variable which happens with <<__parametername__>>
that makes it a variable/macro like, unlike the regular version of $parametername$
which is simply string substitution.
For more information, see "Parameters as Variables <<__...__>>
" in this Tiddler https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText
Here is the full idea to what you told me and it works for me:
\define cpblk(src)
<$macrocall $name="copy-to-clipboard" src=<<__src__>>/>
<pre><$text text=<<__src__>>/></pre>
\end
\define str()
Very
"""
Long
"""
String 'where' I can have any "quotes"
\end
<$macrocall $name="cpblk" src=<<str>> />
@ejmoog: I am not exactly sure what you are asking... Though I will say if URL is external resource, you pretty much have to use HTML anchor directly... Though it's nice to combine it with target="_blank"
and rel="noopener noreferrer"
However, if it is a link to a tiddler, internally in the same Wiki, you have to use <$link to={{!!url}}>some text</$list>
otherwise it will still work but it won't be that neat.
Anyway, since I am not sure what exactly you are trying to do, I will give you few examples and ideas of 2 macros that you can try to implement for yourself. Maybe your answer is somewhere there....
So here. Screenshot of the tiddler to make it easier to follow, hopefully: https://i.imgur.com/MFsIF5r.png
And the text, so that it is easier to copy/paste and modify yourself.
\define anchor(url, text) <a href=<<__url__>> target="_blank" rel="noopener noreferrer"><<__text__>></a>
\define anchorfield(fieldname, text) <a href={{!!$fieldname$}} target="_blank" rel="noopener noreferrer"><<__text__>></a>
<$link to={{!!url_internalTW}}>Internal Tiddler Link</$link>
<a href={{!!url_externalweb}} target="_blank" rel="noopener noreferrer">Link to external Web Page somewhere</a>
<<anchorfield url_externalweb "Macro field: Link to external Web Page">>
<<anchor "https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText" "Macro: Link to external Web Page">>
@TwistingTwists: TiddlyWiki is normally considered as personal Wiki, essentially for 1 person or at most a handful group of people. It's known that there isn't a concrete multi-user system, after all it can be saved to a single HTML file for 1 person to use with no limits.
That said, there are some basic enough options when it comes to handful group of people.
Using TiddlyWiki on node.js, there you can host a TiddlyWiki on a VPS and have read only mode and if they are logged in, to be able to edit. Keep in mind that their edits are on the same TiddlyWiki (best analogy would be to think of it as a single file, so conflicts are possible, that's why I say handful group of people who most likely won't edit the same tiddler at the same time and minimize such conflicts). From node.js you can supply a credentials.csv file that has username and password for your people to login at /login after that they will gain some access to edit the wiki.
You can read more about this and other things I thought are relevant here: https://tiddlywiki.com/#WebServer%20Authorization:%5B%5BWebServer%20Authorization%5D%5D%20%5B%5BWebServer%20Authentication%5D%5D%20%5B%5BWebServer%20Basic%20Authentication%5D%5D%20%5B%5BWebServer%20Parameter%3A%20credentials%5D%5D%20%5B%5BWebServer%20API%3A%20Force%20Basic%20Authentication%20Login%5D%5D%20%5B%5BInstalling%20TiddlyWiki%20on%20Node.js%5D%5D%20%5B%5Btwproxy%20by%20Steve%20Gattuso%5D%5D%20%5B%5BTiddlyServer%20by%20Arlen%20Beiler%5D%5D%20%5B%5B%22Install%20and%20run%20TiddlyWiki%20on%20a%20CentOS%206%20VPS%20using%20Nginx%22%20from%20RoseHosting%5D%5D
Also I would point out to other two TiddlyWiki solutions that kinda have multi-user options as well that are worth looking into:
I recommend you to check TW5-BOB before you decide/conclude anything. If you want a tl;dr version that would be to test BOB and see if it can help your use case.
One more option to consider, you might be able to implement a reverse proxy server (nginx, apache, ect) that handles your login and then provides access to Tiddlywiki or specific instance based on the login.
And if that doesn't work, there is the long big project idea that @ejmoog suggested... which I linked to few (I think good) attempts of that.
Hey!
I'm using a TW for a D&D campaign I'm running, and I'm keeping on the wiki all the information about the game.
One of the things I'm doing is storing characters and NPCs, one of the things I'd like to do is to be able to define relationships between characters/factions, so that I can quickly find, for example, NPCs that are friend of a certain PC. Any ideas on how I could do that? I'm thinking I could use the fields at the bottom of a Tiddler, but how does that actually work, and then how can I search by field?
Feel free to turn the whole idea on its head if you think I'm severely off track, and thanks for your time!