A.3. Nonstandard parsing of Subtags
Subtags are parsed within the containing array-list or hash-list context created by the containing tag (see Looping tags and Sub-tags).
- All subtags at an earlier precedence level are treated before any in the next level.
- Within the same level, tags are processed in the order the appear on the page.
- Any standard tags are processed during 'interpolate' (before) or 'reparse' (after) phases of processing the containing tag.
Technical note
Processing within a hash- or array-list is actually done as a series of global regular expression substitutions on the page. Each substitution replaces one tag with the output of the subroutine(s) associated with it.
In array-list context, subtags are processed in the following order:
- Check for PREFIX-line and prepare for it if present (does not process PREFIX-line at this time)
- PREFIX-sub definitions processed
- if-PREFIX-* nesting resolved
- PREFIX-alternate processed
- if-PREFIX-param processed
- if-PREFIX-pos processed
- PREFIX-pos processed
- if-PREFIX-field processed
- PREFIX-line processed
- PREFIX-increment processed
- PREFIX-accessories processed
- PREFIX-options processed
- PREFIX-code processed
- PREFIX-description processed
- PREFIX-field processed
- PREFIX-price processed
- PREFIX-change processed
- PREFIX-calc processed
- PREFIX-exec processed
- PREFIX-filter processed
- PREFIX-last processed
- PREFIX-next processed
- User's previous HTML widget SELECTED settings restored
- Reparse standard tags in output of above (if reparse enabled for the containing tag)
In hash-list context, subtags are processed in the following order:
- PREFIX-sub definitions processed
- if-PREFIX-* nesting resolved
- PREFIX-alternate processed
- PREFIX-line processed
- if-PREFIX-param processed
- if-PREFIX-field processed
- if-PREFIX-modifier processed (if-PREFIX-param and if-PREFIX-modifier are functionally identical except for parse order)
- PREFIX-increment processed
- PREFIX-accessories processed
- PREFIX-options processed
- PREFIX-sku processed
- PREFIX-code processed
- PREFIX-quantity processed
- PREFIX-modifier processed
- PREFIX-param processed
- PREFIX-quantity-name processed
- PREFIX-modifier-name processed
- PREFIX-subtotal processed
- PREFIX-discount-subtotal processed
- PREFIX-code processed again differently (operating on new instances of PREFIX-code in output of above?)
- PREFIX-field processed
- PREFIX-description processed
- PREFIX-price processed
- PREFIX-discount-price processed
- PREFIX-difference processed
- PREFIX-discount processed
- PREFIX-change processed
- PREFIX-tag processed (*** CHECK THIS TAG NAME ***)
- PREFIX-calc processed
- PREFIX-exec processed
- PREFIX-filter processed
- PREFIX-last processed
- PREFIX-next processed
- User's previous HTML widget SELECTED settings restored
- Reparse standard tags in output of above (if reparse enabled for the containing tag)