Webgen (tm) Index Templates


Webgen (tm) Index templates work just like Leaf Templates with a few differences:

The global variable "leafList" is prepared before an Index Template is called. This variable contains a list of records describing each leaf page that wishes to be referred to by this index instance. Generally an index template will loop over each element of this variable building a list of links. Here is an example of such a loop:
puts $page "<ul>"
foreach rec [lsort -command byTitle $leafList] {
    set leafSer [lindex $rec 0]
    set leafType [lindex $rec 1]
    set leafTitle [lindex $rec 2]
    puts $page "<li><a href=$pgsurl/$leafType.$leafSer.html>$leafTitle</a>"
}
puts $page "</ul>"
Note:
ksedgwic@bonsai.com