It does get easier. This is one of the tricker lessons. The problem is we
become used to using replaceable parameters everywhere and find it hard when we
can't.
I expect you need to learn this youself, but this is how I see it.
Concatenating can be necessary when there is no practical way left to delineate
replaceable parameters to form a new parameter. This is not so obvious because
tiddlywiki goes out of its way reduce the need for delimiters by using those
already available to it.
Although there are exceptions, one way to look at it is when you are passing a
macro or widget a parameter, you need to delimit the beginning and end of the
value eg parm="value" parm=<<varname>> parm={{!!title}} these will be replaced
if simple but you should not expect compound values, ie concatination to be
"evaluated" eg; parm={{!!title}}/subtiddlers because you are assuming this will
occur before it is used as the parm value.
A simple rule is don't try and do too much in your parameters to a macro or
widget. Keep the values to parameters simple in the widget and when
concatenation is required do it before such as the example given. Define the
concatenation elsewhere and reference that and macros are the most versatile.
Wikifi and the Tripple braces and Evans mushroom brackets (= something
evaluated =) are kind of exceptions but wikify is also a widget and only its
text field is special by definition.
Unlike set and wikify, macro definitions do not need opening and closing so
they are often the best way to concatenate, unless you can do it inside a
filter in cases where the macro or widget accepts a filter.
I expect with the new filter string operators in 5.1.20 we will all start using
the triple braces a lot more for this.
Eg
parm={{{ [{!!title}addsuffix[/subtiddlers]] }}}
Regards
Tony
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a46fcd42-7de3-4cfe-8433-be15a99131f3%40googlegroups.com.