One Style
defined in /web/philip/tcl/ad-style.tcl, part of the
style module of the ArsDigita Community System
This page shows the available information on one style defined using ad_register_styletag
.
html_example
A table that contains HTML code and results; the examples should be in a Tcl list
Source code:
set to_return "<center>
<table border=0 cellspacing=2 cellpadding=3 width=90%>
<tr>
<td bgcolor=ececec><b>Code Example</b></td>
<td bgcolor=ececec><b>Typical Rendering</b></td>
</tr>
"
foreach example $string {
# to show the code, we have to change < to <, etc.
set example_code [philg_quote_double_quotes $example]
# then to show the results, we have to change <p> to <p class="mtb"> otherwise
# the stylesheet indents the paragraph
regsub -all {<p>} $example {<p class="mtb">} example_results
append to_return "<tr>
<td valign=top bgcolor=ececec>
<pre>$example_code</pre>
</td>
<td valign=top bgcolor=ececec>
$example_results
</td>
</tr>
"
}
append to_return "</table>
</center>
"
return $to_return
philg@mit.edu