home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1999 September / Dpcb0999.iso / Web / Homesite / data1.cab / HS_Wizards / HTML / Table_Table.wml < prev    next >
Text File  |  1999-04-12  |  3KB  |  124 lines

  1. <WIZSET CellIndent = RepeatString( ' ', 4 )>
  2.  
  3. <WIZSET i = 0>
  4. <WIZLOOP index="item" list="$${HTMLTable}">
  5.     <WIZSET i = i + 1>
  6.     <WIZIF i eq 1>
  7.         <WIZSET ObjectType = item>
  8.         <WIZBREAK>
  9.         <WIZIF ObjectType neq 'Table'>
  10.             <WIZBREAK>
  11.         </WIZIF>
  12.     <WIZELSEIF i eq 2>
  13.         <WIZSET RowCount = item>
  14.     <WIZELSEIF i eq 3>
  15.         <WIZSET ColCount = item>
  16.     <WIZELSEIF i eq 4>
  17.         <WIZSET RowWidths = item>
  18.     <WIZELSEIF i eq 5>
  19.         <WIZSET ColWidths = item>
  20.         <WIZBREAK>
  21.     </WIZIF>
  22. </WIZLOOP>
  23.  
  24.  
  25. <WIZIF ObjectType neq 'Table'>
  26.  
  27. Invalid object type
  28.  
  29. <WIZELSE>
  30.  
  31. <!---- Tag name and attributes ---->
  32.  
  33.  
  34. <WIZSET TableTagName = DefaultCase('TABLE')>
  35.  
  36. <WIZIF Align eq 'center'>
  37.     <WIZSET aAlign = ' ' & DefaultCase('ALIGN') & '="center"'>
  38. <WIZELSEIF Align eq 'right'>
  39.     <WIZSET aAlign = ' ' & DefaultCase('ALIGN') & '="right"'>
  40. <WIZELSE>
  41.     <WIZSET aAlign = ''>
  42. </WIZIF>
  43.  
  44. <WIZIF not ParameterExists('BgColor')>
  45.     <WIZSET aBgColor = ''>
  46. <WIZELSEIF BgColor eq 'Null'>
  47.     <WIZSET aBgColor = ''>
  48. <WIZELSE>
  49.     <WIZSET aBgColor = ' ' & DefaultCase('BGCOLOR') & '="' & BgColor & '"'>
  50. </WIZIF>
  51.  
  52. <WIZIF not ParameterExists('TableWidth')>
  53.     <WIZSET aWidth = ''>
  54. <WIZELSEIF TableWidth eq ''>
  55.     <WIZSET aWidth = ''>
  56. <WIZELSE>
  57.     <WIZSET aWidth = ' ' & DefaultCase('WIDTH') & '="' & TableWidth & '"'>
  58. </WIZIF>
  59.  
  60. <WIZSET aCellSpacing = ' ' & DefaultCase('CELLSPACING') & '="' & CellSpacing & '"'>
  61. <WIZSET aCellPadding = ' ' & DefaultCase('CELLPADDING') & '="' & CellPadding & '"'>
  62.  
  63. <WIZIF Border neq '0'>
  64.     <WIZSET aBorder = ' ' & DefaultCase('BORDER') & '="' & Border & '"'>
  65.  
  66.     <WIZIF Trim(Frame) eq 'Top side only'>
  67.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="above"'>
  68.     <WIZELSEIF Trim(Frame) eq 'Bottom side only'>
  69.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="below"'>
  70.     <WIZELSEIF Trim(Frame) eq 'Top and bottom sides only'>
  71.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="hsides"'>
  72.     <WIZELSEIF Trim(Frame) eq 'Right and left sides only'>
  73.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="vsides"'>
  74.     <WIZELSEIF Trim(Frame) eq 'Left-hand side only'>
  75.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="lhs"'>
  76.     <WIZELSEIF Trim(Frame) eq 'Right-hand side only'>
  77.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="rhs"'>
  78.     <WIZELSEIF Trim(Frame) eq 'All four sides'>
  79.         <WIZSET aFrame = ' ' & DefaultCase('FRAME') & '="box"'>
  80.     <WIZELSE>
  81.         <WIZSET aFrame = ''>
  82.     </WIZIF>
  83.  
  84.     <WIZIF Trim(Rules) eq 'Between row and column groups'>
  85.         <WIZSET aRules = ' ' & DefaultCase('RULES') & '="groups"'>
  86.     <WIZELSEIF Trim(Rules) eq 'Between rows'>
  87.         <WIZSET aRules = ' ' & DefaultCase('RULES') & '="rows"'>
  88.     <WIZELSEIF Trim(Rules) eq 'Between columns'>
  89.         <WIZSET aRules = ' ' & DefaultCase('RULES') & '="cols"'>
  90.     <WIZELSEIF Trim(Rules) eq 'Between all rows and columns'>
  91.         <WIZSET aRules = ' ' & DefaultCase('RULES') & '="all"'>
  92.     <WIZELSE>
  93.         <WIZSET aRules = ''>
  94.     </WIZIF>
  95.  
  96. <WIZELSE>
  97.     <WIZSET aBorder = ' ' & DefaultCase('BORDER') & '="' & Border & '"'>
  98.     <WIZSET aFrame = ''>
  99.     <WIZSET aRules = ''>
  100.  
  101. </WIZIF>
  102.  
  103.  
  104. <$${TableTagName}$${aAlign}$${aBgColor}$${aWidth}$${aCellSpacing}$${aCellPadding}$${aBorder}$${aFrame}$${aRules}>
  105. <WIZSET i = 0>
  106. <WIZSET CurrentRow = 0>
  107. <WIZLOOP index="item" list="$${HTMLTable}">
  108.  
  109.     <WIZSET i = i + 1>
  110.     <WIZIF i gt 5>
  111.         <WIZSET CurrentRow = CurrentRow + 1>
  112.         <WIZSET Row = item>
  113.         <WIZINCLUDE template="Table_Row.wml">
  114.     </WIZIF>
  115.  
  116. </WIZLOOP>
  117.  
  118. <WIZIF 1>>
  119. </$${TableTagName}>
  120. </WIZIF>
  121.  
  122.  
  123. </WIZIF>
  124.