ad_style_html_example

one of the documented procedures in this installation of the ACS
Usage:
ad_style_html_example   { string "" }   { tagset "" }
What it does:
Proc generated by ad_register_styletag to support the html_example ADP tag.
Defined in: /web/philip/tcl/ad-style.tcl

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 &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>
	<td valign=top bgcolor=ececec>
	$example_results
	</td>
	</tr>
	"
    }

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

    return $to_return


philg@mit.edu