On Feb 12, 2008, at 3:35 PM, Thomas Dalton wrote:
$wgOut->addWikiText("{{BolusHeader}}");
foreach row {
$wgOut->addWikiText("{{BolusBody|$data1|$data2|$data3}}");
}
$wgOut->addWikiText("{{BolusTail}}");
with the template BolusHeader defined as {|
and BolusBody defines as |- {{{1}}} || {{{2}}} || {{{3}}}
and BolusTail defined as |}
Is there a specific reason for using templates and not just putting
the syntax in directly?
Customization. The page that delivers the database content is a
special page, and this would allow for the end user to define the top
template like:
Welcome to the bolus page, see [
http://localhost/images/error_rate_daily.png
] for the current error rate.
{| "style = blahblah..
Then for the body template they could do:
| Patient ID {{{1}}} || Error: {{{2}}} || [[BolusErrors:{{{1}}}:
{{{2}}}]] for more information.
And then close it up:
|}
[[Category:Bolus Info]]
Basically it would allow total control over the output of the script,
with out having to edit the script.
--
Don Krause
Head Systems Geek,
Waver of Deceased Chickens.
Optivus Proton Therapy, Inc.
P.O. Box 608
Loma Linda, California 92354
909.799.8327 Tel
909.799.8366 Fax
dkrause(a)optivus.com
www.optivus.com
"This message represents the official view of the voices in my head."