Yes, that's much less verbose thank you!
On Sunday, 6 September 2020 at 19:47:47 UTC-4 Eric Shulman wrote:
> 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:
>>
Okay I just used the Javascipt because I'm more familiar with it than the
macros (which I don't know how to comment either), but I also because
didn't know how to create the new tiddlers in Javascript from the template
tiddlers.
On Sunday, 6 September 2020 at 18:22:20 UTC-4 saq.i...@gmail.com
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
Not sure you need the JavaScript.
Assuming input:
Spelling Template
Desired output:
Spelling - Underground
Try:
<$set name="tiddlerToCreateFromTemplate"
value={{{[removeSuffix[Template]addSuffix[-
Underground]]}}} >
OR
<$set name="tiddlerToCreateFromTemplate"
Okay I got it...had to make a small plugin, but it appears to work...
/*\ title: $:/core/modules/macros/tw5filterTemplatePrefix.js
type: application/javascript module-type: macro Macro to return
something less the prefix.
\*/
(function(){ /*jslint node: true, browser: true */
PS: I realize now you may want addSuffix and not removeSuffix. Apologies.
On Saturday, September 5, 2020 at 9:57:05 PM UTC+2, Saq Imtiaz wrote:
>
> Something along these lines will get you there:
>
> <$set name="tiddlerToCreateFromTemplate"
> value={{{[removeSuffix[Underground]]}}} >
>
> OR
Something along these lines will get you there:
<$set name="tiddlerToCreateFromTemplate"
value={{{[removeSuffix[Underground]]}}} >
OR simplify
<$list filter="[tag[templates]tag[EditingTemplate]]">
<$set name="tiddlerToCreateFromTemplate"
value={{{[removeSuffix[Underground]]}}} >
Use
7 matches
Mail list logo