Tinderbox Template - Dynamically Built HTML Table: Column Heads Children Name, Row Labels Parent’s $Displayed Attributes
Level
Advanced
Published Date
5/2/21 Updated: 5/5/21
Type
Template
Tags
.each, 4CKMEl, 4Cs of Knowledge Management and Exchange, Action Code, Export Code, HTML Table, Tinderbox, aTbRef
Example File
See link below.
Revision
2
TBX Version
8.9
Instructor
Michael Becker
This Tinderbox template dynamically creates an HTML table from the attributes of a container’s children. The table column heads are the parent’s $DisplayedAttributes, and the table’s row labels are the childrens’ $Name (each of the children needs the same $DisplayedAttribures as the parent). The values of the cells are populated from the value in the attributes associated with each $DisplayedAttributes.
Parent container with list of desired attributes to be used as the column heads of the table
Children with same displayed attributes at parent
lt-ProdIteration note, in the following path /Configurations/, with the $LookupList attribute displayed and the key value pair ($Attribute:Label) that will be used in the table
Note: 1. Sample file has two templates in it, look at tSolutionIteration2. 2. Currently only works in TBX 8, there is a lookup issue in TBX 9 backstage that is being worked on.
Thanks! How would one tweak the style so the shading in the header includes the first column too? Also how would one widen that final column so the header doesn’t wrap there? (Realize that must be elementary css but am thinking since you did this so recently you may have the answer readily available.)
I couldn’t figure out why “cell A1” of one table was shaded in one of your tables and not in others. The <style> block looked identical to me.
It turns out (I think) that this is a result of insertion of non-breaking space further down, in the html, which you didn’t have in the table with the shading all the way across.