Remove carriage return from list of tags

85 views
Skip to first unread message

Fidel N

unread,
Nov 11, 2016, 3:26:29 AM11/11/16
to TiddlyWiki

Hello, I would like to use this code to display the tags just after the link of the tiddler, instead of having a carriage return in between.

What I got is this:



And what I'm trying to get is this:





And the code used so far is:

<$list filter="[tag<currentTiddler>sort[title]]"><$link > <<currentTiddler>></$link>{{||$:/core/ui/ViewTemplate/tags}}</$list>

Does anyone know how to remove the carriage returns so instead of getting the outcome of the first image, I could get the second one?

Thanks!

Jed Carty

unread,
Nov 11, 2016, 3:43:59 AM11/11/16
to TiddlyWiki
That is weird. I haven't found what is causing the problem, but this seems to fix it:

<$list filter="[tag<currentTiddler>sort[title]]"><$link to=<<currentTiddler>>><$view field='title'/></$link> <$macrocall $name=tag tag={{!!title}}/></$list>


Fidel N

unread,
Nov 11, 2016, 3:51:43 AM11/11/16
to TiddlyWiki
Wow thank you so much!!
What Im finding hard to swallow is that I cant reach to those conclussions by myself or reading manuals or TW documentation, and I oftend have no other option but come here and ask...
Good thing you guys give a very nice (and fast) support :)
Thanks again Jed

Jeremy Ruston

unread,
Nov 11, 2016, 4:05:42 AM11/11/16
to tiddl...@googlegroups.com
Hi Fidel, Jed,

The problem here is that the original code was transcluding $:/core/ui/ViewTemplate/tags. This is the view template segment that renders the entire tags area of a tiddler in view mode. It renders in block mode, so that the segments slot together properly.

Instead, you should transclude $:/core/ui/TagTemplate, which is the template for rendering a single tag pill. It renders in inline mode so that tag pills can abut one another. Jed’s use of the “tags” macro is a wrapper around $:/core/ui/TagTemplate.

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/aee9b056-8c4d-429f-8902-8d3e0eecf72a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fidel N

unread,
Nov 11, 2016, 4:24:50 AM11/11/16
to TiddlyWiki
Thanks for the clarification, it helps a lot.

So the resulting simpler code would be:

<$list filter="[tag<currentTiddler>sort[title]]"><$link > <<currentTiddler>></$link>{{||$:/core/ui/TagTemplate}}</$list>

:)

Fidel N

unread,
Nov 11, 2016, 6:14:12 AM11/11/16
to TiddlyWiki
Erm... I cant get this new sintax to show the tiddlers tags, this one is showing the "currentTiddler" name in the shape of a tag, not the tag itself as Jed's suggestion correctly did.
Again, I have tried to find documentation on how to replace the variable within the trasclusion (Im guessing this code needs to include each tag name):
{{||$:/core/ui/TagTemplate}}
But couldn't make it.
Jeremy, do you have any suggestion on how to produce the same results as Jed got, but with "$:/core/ui/TagTemplate" instead?

Jeremy Ruston

unread,
Nov 11, 2016, 6:25:33 AM11/11/16
to tiddl...@googlegroups.com
Hi Fidel

If I paste your example code into HelloThere on tiddlywiki.com then I get the expected results:



Erm... I cant get this new sintax to show the tiddlers tags, this one is showing the "currentTiddler" name in the shape of a tag, not the tag itself as Jed's suggestion correctly did.

Do you get the same results?

Again, I have tried to find documentation on how to replace the variable within the trasclusion (Im guessing this code needs to include each tag name):
{{||$:/core/ui/TagTemplate}}

The currentTiddler variable is used to pass the title of the tag to be shown.

But couldn't make it.
Jeremy, do you have any suggestion on how to produce the same results as Jed got, but with "$:/core/ui/TagTemplate" instead?

Let me know how you get on,

Best wishes

Jeremy


Fidel N

unread,
Nov 11, 2016, 7:55:43 AM11/11/16
to TiddlyWiki

Jed Carty

unread,
Nov 11, 2016, 8:01:19 AM11/11/16
to TiddlyWiki
then use nested list widgets like this:

<$list filter="[tag<currentTiddler>sort[title]]"><$link to=<<currentTiddler>>><$view field='title'/></$link> <$list filter='[is[current]tags[]]'>{{||$:/core/ui/TagTemplate}}</$list></$list>

Fidel N

unread,
Nov 11, 2016, 8:13:07 AM11/11/16
to TiddlyWiki
Awesome :)
Reply all
Reply to author
Forward
0 new messages