Ignore:
Timestamp:
07/25/10 13:30:18 (3 years ago)
Author:
PaulHarvey
Message:

Item9317: 3-line ADDTOZONE fix ended up being a lot bigger than intended

  • body zone is now an alias to head zone when not {OptimizePageLayout}
  • Renamed some vars and methods, because they seemed a little opaque.
  • Rename tag parameter to id (tag is still supported, undocumented)
  • Added a new parameter, missingtoken, which dictates the output of a new format token: $missing. This adds information in the <!-- $id --> decoration that's appended after each ADDTOZONE's content if there were required ids that could not be found.
  • Adjusted docs, probably too much.
  • Added some tests.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/data/System/VarRENDERZONE.txt

    r8289 r8298  
    1212   * ="zone"= required, name of the zone 
    1313   * =header="..."= optional, prefix format string 
    14    * =format="..."= optional, format string for each item added to the zone, defaults to =$item=. 
     14   * =format="..."= optional, format string for each item added to the zone, defaults to =$item=. Tokens: 
     15      * =$id= - =id= of the [[VarADDTOZONE][ADDTOZONE]] call within the =zone= currently being rendered. 
     16      * =$item= - text of the [[VarADDTOZONE][ADDTOZONE]] call within the =zone= currently being rendered. 
     17      * =$zone= - the ="zone"= currently being rendered. 
     18      * =$missing= - if the [[VarADDTOZONE][ADDTOZONE]] call being rendered required any =id= which was not found, then =$missing= is the =missingtoken= parameter; empty string otherwise. 
     19      * =$missingids= - comma separated list of ids that were required by the [[VarADDTOZONE][ADDTOZONE]] call currently being rendered but weren't found within this =zone=. 
     20   * =missingtoken="..."= optional, this will be the string assigned to the =$missing= format token for use in the =format= parameter. Defaults to ="$missingids"= 
    1521   * =chomp="on"= remove leading and trailing whitespace from formatted items, can be useful for pretty-printing and compression. 
    1622   * =footer="..."= optional, suffix format string 
     
    2329 
    2430=head= and =body= are _built-in_ zones - there is no corresponding =RENDERZONE= 
    25 required in the templates. 
     31required in the templates, they will be rendered automatically. 
     32 
     33%ICON{"info"}% Zones are flushed when rendered; they may only be rendered once 
    2634 
    2735See also [[VarADDTOZONE][ADDTOZONE]] for more information on zones. 
Note: See TracChangeset for help on using the changeset viewer.