if ( `_redir` == "root" )
No, that'd turn into one of the following, either:
if ( root == "root" )
or
if ( `_redir` == "root" )
neither of which looks like valid javascript to me. So you'd want something more like:
if ( "`_redir`" == "root" )
which would induce a syntax error if somehow you got a quote (or perhaps a trailing backslash) in your parameter value.
There needs to be an escape specifier for use in javascript strings. Perhaps:
if ( "`_redir\`" == "root" )
where that trailing \ tells the Free Nodelet templating to apply quotemeta to the parameter value (not implemented yet). I haven't checked exactly how escaping works in javascript strings, so quotemeta might not be appropriate. Perhaps `_redir"` would surround it in quotes and escape as appropriate.
- tye
In reply to Re^3: Free Nodelet Hack: Add parent & root links to nodes in 'Nodes You Wrote' (escape)
by tye
in thread Have parent 'Node ID' as link in 'Nodes You Wrote' node
by madbombX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |