On Saturday, September 5, 2020 at 12:05:24 PM UTC-7, leeand00 wrote: > > So I'm using a filter, and it's working great to remove the suffix and add > another one...see below: > [tag[templates]tag[EditingTemplate]] +[removesuffix[Template]] +[addsuffix > [ - Underground]] > But...what I really want to do here, is remove the suffix and add another > one in a variable so I can create a bunch of template tiddlers: > > <$list filter="[tag[templates]tag[EditingTemplate]]"> > <$set name="whichTiddlerTemplateName" value=<<currentTiddler>> > > <$set name="tiddlerToCreateFromTemplate" value="< > <whichTiddlerTemplateName>> - Underground" > > Use This Template: <<whichTiddlerTemplateName>><br/> > Create This Tiddler From Template: <<tiddlerToCreateFromTemplate>><br/> > <hr/> > </$set> > </$set> > </$list> > > In the second <$set> above (" tiddlerToCreateFromTemplate") I want to be > able to remove the template prefix the way I did in the filter...so that I > get Spelling - Underground > <http://wiki.helpdeskaleer.com:8080/jobhunt/softskills/email/plainlanguage#Spelling%20-%20Underground> > > instead of Spelling Template - Underground > <http://wiki.helpdeskaleer.com:8080/jobhunt/softskills/email/plainlanguage#Spelling%20-%20Underground> > > how do I do that? >
In addition to using filter syntax in the $list widget's filter="..." parameter, you can also use the same filter syntax "inline" to compute a value for *any* widget parameter by enclosing it within tripled curly braces {{{ [...] }}} For your example, you can write this: <$list filter="[tag[templates]tag[EditingTemplate]]"> <$vars tiddlerToCreateFromTemplate={{{ [<currentTiddler>removesuffix[Template]addsuffix[ - Underground]] }}} Use This Template: <<currentTiddler>><br/> Create This Tiddler From Template: <<tiddlerToCreateFromTemplate>><br/> </$vars> <hr/> </$list> -e -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f3258a5d-1e75-4761-90b5-69818ad78ff3o%40googlegroups.com.