OutputTable Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 39: Line 39:
|-
|-
|headertemplate
|headertemplate
|(Optional) Id – Specifies the unique id of the template to be used for a header item that appears at the top of the table. This allows you to add column headers above various pieces of information in the table. If empty, the "headeritem" element dictates whether a header is displayed above the table. Default: Empty.
|(Optional) Id – Specifies the unique id of the template to be used for a header item that appears at the top of the table. This allows you to add column headers above various pieces of information in the table. If empty, the "headertitle" element dictates whether a header is displayed above the table. Default: Empty.
|-
|-
|headerpick
|headerpick
Line 52: Line 52:
|An optional "list" element may appear as defined by the given link. This element defines a [[List Tag Expression]] for the portal.
|An optional "list" element may appear as defined by the given link. This element defines a [[List Tag Expression]] for the portal.
|-
|-
|[[#headeritem|headeritem]]
|[[#headertitle|headertitle]]
|An optional "headeritem" element may appear as defined by the given link. This element defines a [[HeaderItem Script]] for the portal.
|An optional "headertitle" element may appear as defined by the given link. This element defines a [[HeaderTitle Script]] for the portal.
|-
|-
|}
|}
Line 67: Line 67:
|}
|}


==The "headeritem" Element{{anchor|headeritem}}==
==The "headertitle" Element{{anchor|headertitle}}==


The "headeritem" element defines a [[HeaderItem Script]] for the portal that synthesizes the text to be displayed at the top of the table as a header. The complete list of attributes for this element is below.  
The "headertitle" element defines a [[HeaderTitle Script]] for the portal that synthesizes the text to be displayed at the top of the table as a header. The complete list of attributes for this element is below.  


:{| class="infotable"
:{| class="infotable"
|class="leftnormal"|PCDATA
|class="leftnormal"|PCDATA
|Script – Specifies the code comprising the HeaderItem script.
|Script – Specifies the code comprising the HeaderTitle script.
|-
|-
|}
|}
Line 91: Line 91:
   <output_table component="Adjustment" showtemplate="oAdjPick" columns="2">
   <output_table component="Adjustment" showtemplate="oAdjPick" columns="2">
     <list>Helper.Activated</list>
     <list>Helper.Activated</list>
     <headeritem>
     <headertitle>
       @text = "Activated Adjustments"
       @text = "Activated Adjustments"
       </headeritem>
       </headertitle>
     </output_table>
     </output_table>
   </portal>
   </portal>
</pre>
</pre>

Revision as of 02:09, 9 December 2008

Context: HL Kit &#133; Kit Reference &#133; Data File Reference &#133; Portal Element (Data) 

The "output_table" Element

Output tables are exclusively for use within character sheet output, hence the name. Due to their behavior, output tables are very similar to fixed tables, with the primary distinction being that output tables can support variable height items. Each output table is defined via the use of the "output_table" element. The complete list of attributes for this element is below.

component Id – Specifies the unique id of the component that all shown objects must be derived from.
showtemplate Id – Specifies the unique id of the template to be used for displaying the picks that have been added to the table.
showpicks (Optional) Set – Designates the source from which the picks shown are retrieved from. Must be one of these values:
  • container – The picks shown are from the implicitly identified container. If the containing scene is a form associated with a gizmo, the gizmo is used, else the actor is used.
  • hero – The picks shown are from the active actor.
  • actor – The picks shown represent all actors in the entire portfolio.
  • lead – The picks shown represent all lead actors in the entire portfolio.
  • minion – The picks shown are all immediate minions for the active actor.
  • Default: "container".
showsortset (Optional) Id – Specifies the unique id of the sort set to be used for sequencing the items that exist within the table. If empty, all objects are sorted by name. Default: Empty.
showgaphorz (Optional) Integer – Specifies the gap along the horizontal access to insert between items that exist within the table. Default: "0".
showgapvert (Optional) Integer – Specifies the gap along the vertical access to insert between items that exist within the table. Default: "0".
columns (Optional) Integer – Specifies the number of columns of data to display within the table. Default: "1".
varyheight (Optional) Boolean – Indicates whether the items output within the table can be of varying height. This is extremely valuable for material like special abilities, journal entries, etc. Such material can have description text that ranges from short to long, and it's necessary that each item in the table have a suitable height that matches its contents. Default: "no".
headertemplate (Optional) Id – Specifies the unique id of the template to be used for a header item that appears at the top of the table. This allows you to add column headers above various pieces of information in the table. If empty, the "headertitle" element dictates whether a header is displayed above the table. Default: Empty.
headerpick (Optional) Id – Specifies the unique id of a thing that is associated with the header item at the top of the table. HL will retrieve any pick based on this thing that exists within the target container and use it. This allows you to control what fields can be accessed from the "headertemplate". If empty, the "actor" pick is used, except within a gizmo, where its "defaultthing" is used instead. Default: Empty.

The "output_table" element also possesses child elements that define additional behaviors of the portal. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.

list An optional "list" element may appear as defined by the given link. This element defines a List Tag Expression for the portal.
headertitle An optional "headertitle" element may appear as defined by the given link. This element defines a HeaderTitle Script for the portal.

The "list" Element

The "list" element defines a List Tag Expression for the portal that limits the set of picks that are shown. The complete list of attributes for this element is below.

PCDATA TagExpr – Specifies the code comprising the List tag expression.

The "headertitle" Element

The "headertitle" element defines a HeaderTitle Script for the portal that synthesizes the text to be displayed at the top of the table as a header. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the HeaderTitle script.

Example

The following example demonstrates what an output table portal might look like. All default values are assumed for optional attributes.

<portal id="oJournTbl" style="outNormal">
  <output_table component="Journal" varyheight="yes"
      showtemplate="oJrnPick" showpicks="yes">
    </output_table>
  </portal>

<portal id="oAdjust" style="outNormal">
  <output_table component="Adjustment" showtemplate="oAdjPick" columns="2">
    <list>Helper.Activated</list>
    <headertitle>
      @text = "Activated Adjustments"
      </headertitle>
    </output_table>
  </portal>