Post Script,
What I like about this method, is how $:/NS can contain code to activate
various logic. I have separately created one that transcludes tagged items
eg you call it with
{{tagname||$:/tags}} and $:/tags contains the logic to transclude all
tiddlers tagged tagname.
In the one I am working on for custom actions for tiddler buttons I use
actions={{buttontiddler||$:/actiontags}} and it uses the current tiddler to
manufacture a tag name eg $:/tags/$(currentTiddler)$ then transclude the
content of tiddlers tagged $:/tags/$(currentTiddler)$ or
$:/tags/buttontiddler
I can even see a transclusion that transcludes a hierarchy of tiddlers.
Regards
Tony
On Sunday, October 27, 2019 at 11:32:09 AM UTC+11, TonyM wrote:
>
> TT,
>
> It works for me on tiddlywiki.com
>
> The link is only clickable before the tiddler "$:/NA/any name" is created.
>
> Once created it transcludes the content.
>
> Here is a version that adds an edit button after the transcluded content.
>
> \define tiddlername() $:/NS/$(currentTiddler)$
> <$list filter="[<tiddlername>has[text]]">
> <$transclude tiddler=<<currentTiddler>>/> {{||$:/core/ui/Buttons/edit}}
> </$list>
> <$list filter="[<tiddlername>!has[text]]" variable=nul>
> <$link to=<<tiddlername>> ><<currentTiddler>></$link>
> </$list>
>
>
> Regards
> Tony
>
>
>
> On Sunday, October 27, 2019 at 4:42:33 AM UTC+11, @TiddlyTweeter wrote:
>>
>> Hi Tony
>>
>> Unfortunately I don't get a clickable link.
>>
>> Not clear what I am doing wrong.
>>
>> TT
>>
>> On Saturday, 26 October 2019 05:35:16 UTC+2, TonyM wrote:
>>>
>>> Folks,
>>>
>>> I am just sharing a little code play here. I can imagine a number of
>>> possibilities with this. Hows your imagination?
>>>
>>> Create a tiddler named $:/NS (for Name Service) and include the following
>>> \define tiddlername() $:/NS/$(currentTiddler)$
>>> <$list filter="[<tiddlername>has[text]]" variable=nul>
>>> <$transclude tiddler=<<tiddlername>>/>
>>> </$list>
>>> <$list filter="[<tiddlername>!has[text]]" variable=nul>
>>> <$link to=<<tiddlername>> ><<currentTiddler>></$link>
>>> </$list>
>>>
>>> Now in any tiddler you can type
>>> {{any name||$:/NS}}
>>>
>>>
>>> - If the tiddler does not exist, a link to a tiddler named
>>> "$:/NS/any name" is displayed, click to create it.
>>> - If the tiddler exists it will be transcluded, followed by an edit
>>> button to open it for edit.
>>>
>>> How could you make use of this mechanism?
>>>
>>> Regards
>>> Tony
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/8384089a-4ed8-4f27-821a-f24ad8682184%40googlegroups.com.