Question: using the link widget for external links

148 views
Skip to first unread message

David Gifford

unread,
Feb 5, 2018, 8:02:21 AM2/5/18
to TiddlyWiki
Hi all

I want to create a pretty link in an index where the link is to the URL of an external page (preferably relative path, but I could live with absolute path), but the text shown refers to a field of a tiddler within the tiddlywiki file.

Use case: I use a standalone TiddlyWiki to generate static pages, and a static index. I use the title fields of the tiddlers for the filename of the static pages, and a separate field called 'showname' to display the viewable title of the article in the tiddler. Since I plan to change shownames often (eg, from '8 things about this topic' to '10 things about this topic'), I want the index to automatically update so I don't have to hand enter each change in the index. That way, when I generate the static index, the showname titles will be baked in, but the links will be to web pages relative to the location of the index.

I tried the following but they didn't work. I realize the problem is that I am mixing html tags with TiddlyWiki widgets. What could I do to get this?

*<a href="./presentaciones.html"><$view tiddler="presentaciones" field="showname"/></a>

*<$link to="./presentaciones.html"><$view tiddler="presentaciones" field="showname"/></$link>



David Gifford

unread,
Feb 5, 2018, 10:34:13 AM2/5/18
to TiddlyWiki
I found a workaround for now, by separating the showname from the link. But I would still love it if there were a way to combine the two.

*<$view tiddler="acercamientos" field="showname" format="text"/> - [ext[liga|./acercamientos.html]]

coda coder

unread,
Feb 5, 2018, 12:30:16 PM2/5/18
to TiddlyWiki
David

Perhaps I'm not understanding the issue, but both of these work for me:


1 <a href="recipes.html">{{recipes!!link-text}}</a>

2 <a href="recipes.html"><$view tiddler="recipes" field="link-text"/></a>

Mark S.

unread,
Feb 5, 2018, 12:49:53 PM2/5/18
to TiddlyWiki
What method are using to create the static page? Do the file names have any special characters?

Your first approach creates working links when I export a static page from the advanced search tiddler.

-- Mark

David Gifford

unread,
Feb 5, 2018, 2:04:33 PM2/5/18
to tiddl...@googlegroups.com
Hi Coda and Mark,

T
​hanks! I see now what I was doing wrong...

Here is my final output *<a href="./gracia.html" class="tc-tiddlylink-external"><$view tiddler="gracia" field="showname"/></a>​

David Gifford
Mexico team leader, Mexico City

Resonate Global Mission
Engaging People. Embracing Christ.
A Ministry of the Christian Reformed Church
resonateglobalmission.org


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/sGYWl-xMTxA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e688e01f-c0c7-4d31-bf51-39b774fb68c9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages