This version is out of date, covering development from v4.6.0 to v4.7.1. It is maintained here only for inbound reference links from elsewhere.
Jump to the current version of aTbRef.
|A Tinderbox Reference File : Export Codes : Export Code Types : Data Include : ^value( expression )^||aTbRef Site Map|
^value( expression )^
|Code Type:||Data Include|
|Code Scope of Action:||n/a|
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:
exports the width of the current note, and is equivalent to
So you may use the two forms interchangeably even where no manipulation of the target attribute is required.
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.
The ^value^ code also gives a method for using action code to retrieve attribute values. The following give the same output:
^get(SiblingOrder)^ (value here = 15)
^value($SiblingOrder)^ (value here = 15)
|Up: Data Include|
|Previous: ^title( item )^|
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]