A Tinderbox Reference File : Export Codes : Export Codes - Full Listing : ^value( expression )^ |
^value( expression )^ |
^value(expression)^
The argument to ^value^ is an expression — a value that could be assigned to an attribute. ^value^ evaluates the expression and exports the result, as a string. This allows manipulations for export use without needing to, for instance, hold the value in a user attribute first.
^value^ is in effect a version of ^get^/^getFor^ but which allows the called attribute's value to be manipulated. For example:
^value($Width)^
exports the width of the current note, and is equivalent to
^get(Width)^
So you may use the two forms interchangeably even where no manipulation of the target attribute is required.
More examples:
^value(sqrt($Width))^
^value("Name: "+$Name)^
^value($Name+":"+$Name(parent))^
See also ^action (action )^.
You don't need to use ^value^ explicitly internally for actions and rules as the expanded v4+ syntax already covers this.
Up: Export Codes - Full Listing | |
Previous: ^urlEncode( data )^ | Next: ^version^ |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]