In TiddlyWiki (5) my macro works in tiddlers, except when appearing as sidebar

113 views
Skip to first unread message

icqol.s...@gmail.com

unread,
Mar 30, 2019, 6:02:24 PM3/30/19
to tiddl...@googlegroups.com

Screen Shot 2019-03-27 at 15.11.20.png



My global macro shows a list of all tiddlers with a certain tag[category]. The tag is taken from the list field of the tiddler that calls the macro. The macro works fine when used in a regular tiddler, but if I set the tiddler to be a sidebar via $:/tags/SideBar, the sidebar shows the tab, but nothing inside.


My prior version worked when the macro call explicitly identified the tag  as follows: <<activityList book>>, but what I really want is to put the category (book) in a field and pull that via: <$macrocall $name=activityList category={{!!list}} />. Again, this works as tiddler, but sidebar.


This is the macro (the 3rd and 4th lines are not relevant, they are just the output): (the category is the variable tag. "tag" parameter is just the word tag.)

\define activityList(category:""  tag:"tag[") 
<$list filter="[$tag$$category$]]">
&raquo; <$link to=<<currentTiddler>>><$view field=title/></$link><br>
{{||$:/core/ui/ViewTemplate/tags}}
</$list>


That's basically it, but, just to note: I made another version that modifies the macro to use a call to include the brackets: [book]. That had no effect.

TonyM

unread,
Mar 30, 2019, 7:44:15 PM3/30/19
to TiddlyWiki
Hi

Without reviewing what you have done in detail tiddlers in the sidebar do not have the current tiddler set. Use the tiddler widget or include full text references when referring to anything in the tiddler you tagged with $:/tags/SideBar

for example {{mytiddler!!fieldname}}

Of course once you use a $list without setting its variable the variable will be <<currentTiddler>> but only inside that list.

Regards
tony

icqol.s...@gmail.com

unread,
Mar 31, 2019, 6:18:38 PM3/31/19
to TiddlyWiki

Thanks!!! That's what I needed to know!!
Reply all
Reply to author
Forward
0 new messages