The <<hideWhen>> macro accepts a *single* parameter which is a
javascript expression to be evaluated. However, the compound boolean
expression you entered contains spaces, which causes it to be
processed as several separate parameters.
Normally, in order for the entire expression to be processed as a
single macro parameter, you would enclose it within either single- or
double-quotes.
However, when used within TW templates, double-quotes are already used
to delimit the entire macro="..." syntax and, in this particular use-
case, the parameter value itself includes single-quotes.
Fortunately, the TW macro syntax supports use of a third type of
delimiters around parameter values: '[[' and ']]' (doubled-square
brackets). This provides the means to properly delimit a parameter
value that contains spaces, while still allowing other use of single-
and double-quotes as surrounding delimiters or embedded content.
Try this:
<span macro="hideWhen [[tiddler.tags.contains('Locked') ||
window.location.protocol!='file:']]">
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---