All,

I just realised the exception to creating "compound values" in parameters 
is when you are using $paramname$ $(paramname}$ and possibly 
<<__...__>>


See
https://tiddlywiki.com/prerelease/#Macro%20Definitions%20in%20WikiText


Regards
Tony

On Wednesday, October 24, 2018 at 8:37:32 AM UTC+11, TonyM wrote:
>
> Jed,
>
> That is some helpful information speaking from Experience there. Perhaps I 
> can add something?
>
> I would add that when something is already delimited (its beginning and 
> end indicated) it we do not need to go out of our way to delimit it. 
> Especially with titles. eg in param={{tiddlername}}  tiddlername is already 
> "bracketed", so param="{{tiddlername}}" is over kill and will return the 
> literal string "{{tiddlername}}" not the content of tiddlername's text 
> field.  I found this is not documented in 
> https://tiddlywiki.com/#Macro%20Calls%20in%20WikiText and other places
>
> *Each parameter value can be enclosed in 'single quotes', "double quotes", 
> """triple double quotes""" or [[double square brackets]]. Triple double 
> quotes allow a value to contain almost anything. If a value contains no 
> spaces or single or double quotes, it requires no delimiters.*
>
> Jed do you agree with the following?
>
> If parameters are supplied using <<amacroorvariable>> a text reference 
> {{tiddlername}} or a field in the current tiddler {{!!fieldname}} they are 
> already delimited and need not be surrounded by quotes or [[double square 
> brackets]]
>
> The above is commonly done using the macrocall widget so that the 
> parameters can be interpreted in the macrocall. The macro call allows you 
> to name a macro, its parameters and provide parameters
>
> Ie; you could say <<mymacro params>> but if you want to pass a param of 
> <<myothermacro>> it will be difficult. So instead use the macrocall widget, 
> so you can freely pass the parameters.
>
> <$macrocall $name=mymacro param1=<<myothermacro>> />
>
> Of note is in most cases except the wikify widget the value in a parameter 
> will not be "wikified" so you CANNOT supply "compound values" in a parameter
>
> eg param="MyPrefix/{{!!title}}" for example, because the parameter will 
> not first be wikified to replace {{!title}} with its current value.
>
> For this reason people tend to use macros, wikify and sometimes set to 
> create a "compound value" to use as the parameter in a macro.
>
> This was hard one knowledge, that now seems obvious to me but caused real 
> problems for me in the beginning.
>
> *Criticisms of above statements welcome.*
>
> Regards
> Tony
>
>
> On Wednesday, October 24, 2018 at 7:07:59 AM UTC+11, Jed Carty wrote:
>>
>> A single set of curly braces is only used inside filters. It is the same 
>> as {{foo}} outside of filters in that it transcludes the content of foo. 
>> {{{ [tag[foo]] }}} is a shorthand for the list widget and is not actually 
>> related to the other uses.
>>
>> The part that adds the square brackets has nothing to do with the { part, 
>> some operators treat any input as a title list and some widgets treat their 
>> output as a title list.
>>
>> If an input is treated as a title list than any spaces will be used as 
>> separators between items unless it is surrounded by [[ and ]], and outputs 
>> from things that give title lists will put [[ and ]] around any items that 
>> have spaces in the name.
>>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c8bbfd29-c904-49e7-bdc7-28c91793194e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to