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_big_example

A table that contains HTML code and results; the examples should be in a Tcl list. This puts the results in their own row below the code. It's meant for big examples, like HTML forms.
Source code:


    set to_return "<center>
    <table border=0 cellspacing=2 cellpadding=3 width=90%>
    <tr>
    <td bgcolor=ececec><b>Code Example</b></td>
    </tr>
    "

    foreach example $string {

	# to show the code, we have to change < to &lt;, 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>
	</tr>
        <tr><td bgcolor=white><font size=-3>&nbsp;</font></td></tr>
	<tr>
	<td bgcolor=ececec><b>Typical Rendering</b></td>
	</tr>
	<tr>
	<td valign=top bgcolor=ececec>
	$example_results
	</td>
	</tr>
	"
    }

    append to_return "</table>
    </center>
    "

    return $to_return


philg@mit.edu