[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-19 Thread Mat
> \define ModifierBlock(for) > Hello > <$set name="mfield" filter="[[$for$]lowercase[]addprefix[mod-]]"> > <> > > <$list filter="[all[tiddlers]has]"> > <><$view field=<> /> > > > > \end > > <> > So, IMO this slightly modified code should say Hello, list the dumpvariables and then show a

[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-19 Thread Felicia Crow
Hi, I am sorry, I have missed something that is by now obvious to me, but not necessarily to everyone. When you wrote that your macro did not produce any output I tested the macro and since my tests where in the same tiddler due to it being easier it of course worked. >From what you are

[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-19 Thread Mark Green
I don't suppose anyone has any further enlightenment on this, do they? I'm still completely stuck. Even changing the macro to: \define ModifierBlock(for:"") Hello <$set name="x" value=<<__for__>> > <$set name="mfield" filter="[titlelowercase[]addprefix[mod-]]"> <> <$list

[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-09 Thread Mark Green
Thanks for your help. Basically there are two steps to the process. 1. Implement mod- fields: each tiddler will list the tiddler name and field contents for any other tiddler with a "mod-" name matching it. So if tiddler Foo has a mod-Bar attribute of "Hello", then viewing tiddler Bar will

[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-08 Thread Mat
As TW Tones notes, the coming slugify operator will do this but it is not sure that period characters (.) will be dealt with so you'd still need e.g split[.]join[-] Also note the "lowercase filter operator" because field names are not

[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-08 Thread TW Tones
Mark, In addition I notice that fields cannot contain spaces. There does not seem > to be any filter operator to remove all spaces from a title to create > something that could be used as a field name, is this possible? > > In the next version of tiddlywiki previewed here > new slugify

[tw5] Re: Converting a tiddler name to a field name to display relevant fields

2020-07-08 Thread Felicia Crow
Hi, your macro works fine for me, except when not specifying a tiddler, as your actual default value is an empty string, not the current tiddler. As a fix you could use the emptyValue parameter of the set widget when setting x: <$set name="x" value=<<__for__>> emptyValue=<> > For your second