Presenting: Aliases - a working CSS solution

112 views
Skip to first unread message

Mat

unread,
Jun 9, 2016, 11:02:07 AM6/9/16
to TiddlyWiki
Aliases - to get another title showing in the tiddler river.

Yup, I actually think I solved it. Even if I suspect it is not achieved in the standard way :-)

<:-)


As for all my creations: If you even take the quickest peek on it, you're obliged to make friend or colleague of yours happy by informing them what you like about TW - or make a quick printout and leave a silent statement on that wall...

Jeremy Ruston

unread,
Jun 9, 2016, 11:16:52 AM6/9/16
to tiddl...@googlegroups.com
Hi Mat,

Bravo, that demonstrates a very high degree of cunning. Looking at the source of the “Alias ViewTemplate” tiddler, I note several interesting tricks and techniques:

* using CSS to hide the original title and insert the alias
* using the <<makedatauri>> macro to obtain a URI encoded version of the tiddler title
* using the <$list> widget with the variable and filter attributes to do string processing (in this case, removing the prefix provided by the makedatauri macro)

The only thing you might want to watch is the use of <<urititle>> in the style definitions: the result will be wikified, which will give unexpected results were the alias of a tiddler to contain wikitext. I created a tiddler with <br> in the alias field as an example; the result is excess space between the title and the subtitle. Anyhow, you could avoid it by using a nested macro and within it the text substitution syntax. (Of course, there’d still be some minor issues like titles/aliases containing single quotes).

Very good stuff,

Best wishes

Jeremy.



--
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 tiddlywiki+...@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/054c4c4c-2c17-4d44-87fd-02666ac77559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Jun 9, 2016, 11:36:36 AM6/9/16
to TiddlyWiki
That is very encouraging feedback! Thank you Jeremy!!!

I'll see what I can do about the points you raise. 

<:-)

Jed Carty

unread,
Jun 9, 2016, 2:53:02 PM6/9/16
to TiddlyWiki
This looks good. I was thinking about something like this today for the twederation configuration tiddlers. 
Reply all
Reply to author
Forward
0 new messages