User Tools

Site Tools


harlowe:hook

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

harlowe:hook [2017/10/09 20:39] (current)
Line 1: Line 1:
 +**(hook: // [[harlowe:​String|String]]//​) -> //​[[harlowe:​Changer|Changer]]//​**
  
 +A [[harlowe:​Command|Command]] that allows the author to give a hook a computed tag name.
 +
 +=== Example usage: ===
 +
 +''​%%(hook:​ $name)[]%%''​
 +
 +=== Rationale: ===
 +
 +You may notice that it isn't possible to attach a nametag to hooks with commands
 +already attached - in the case of ''​%%(font:"​Museo Slab"​)[The Vault]<​title|%%'',​ the nametag results
 +in an error. This command can be added with other commands to allow the hook to be named:
 +''​%%(font:"​Museo Slab"​)+(hook:​ "​title"​)%%''​.
 +
 +Furthermore,​ unlike the nametag syntax, (hook:) can be given any [[harlowe:​string|string]] expression:
 +''​%%(hook:​ "​eyes"​ + (string:​$eyeCount))%%''​ is valid, and will, as you'd expect, give the hook
 +the name of ''​%%eyes1%%''​ if ''​%%$eyeCount%%''​ is 1.
 +
 +=== See also: ===
 +
 +[[harlowe:​hidden|(hidden:​)]]
harlowe/hook.txt ยท Last modified: 2017/10/09 20:39 (external edit)