I am trying to generate a link to a tiddler in Tiddlywiki.com 
programmatically!

The tiddler title is: Hidden Setting: New-Image Type
The title has colon (:).

I used something link this

\define theLink() [ext[$(currentTiddler)$]]

<$list filter="[[Hidden Setting: New-Image 
Type]addprefix[https://tiddlywiki.com/#]]";>
<<theLink>>
</$list>


It does not work!

I also tried as below

<a href={{{ [[Hidden Setting: New-Image 
Type]addprefix[https://tiddlywiki.com/#]]+[encodeuri[]] }}} target="_blank">
Go</a>

It fails again!

If I was NOT wrong, Tiddlywiki uses the colon (:) after the first # to 
create a story of tiddlers (e.g. permview of several tiddlers opened in 
story river)


   - Ugly solution

I know, it possible to encode every colon(:) in title as below and then the 
code work  (colon : encodes to %3A see:
https://www.w3schools.com/tags/ref_urlencode.ASP)

\define theLink() [ext[$(currentTiddler)$]]

<$list filter="[[Hidden Setting: New-Image 
Type]split[:]join[%3A]addprefix[https://tiddlywiki.com/#]]";>
<<theLink>>
</$list>



   - Worst solution

\define theLink() https://tiddlywiki.com/#:[title[$(currentTiddler)$]]

<$list filter="[[Hidden Setting: New-Image Type]]"> 
<a href=<<theLink>> target="_blanl">Go</a>
</$list>


NOTE: Examples only shows how programmatically the issue occurs otherwise, 
the filter creates many tiddlers...


What do you propose?


--Mohammad

p.s: I do not believe to solve an issue in any way! A semantic code and a 
simple solution is always is a better solution

-- 
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/b420425e-b81b-4ae4-aec5-595811f93854%40googlegroups.com.

Reply via email to