Last modified: 2011-04-14 15:11:06 UTC
I would like a way to define a template (or something equivalent), for use on a single page, within that page. There are times when it makes sense to define a template that will only be used on one page, for example a "row template" for a single use table. Creating a separate template has a few disadvantages: * When trying to examine the WikiMarkup, you have to open multiple pages to see what is going on. * Testing the template requires saving the template every time you make a change. You cannot just use the preview feature to see how things will be formatted. * The history of the main page and the template are separate, so retrieving old versions can result in mismatches. I would like instead to do something like this: #defineTemplate row |- | style="font-weight: bold; text-align: left" | {{{name}}} | style="text-align: right" | {{{age}}} | style="background-color: #DDD; text-align: right" | {{{salary}}} #endTemplate {| {{row | name="Sally" | age="25" | salary="$50,000" }} {{row | name="Dick" | age="30" | salary="$75,000" }} {{row | name="Jane" | age="35" | salary="$100,000" }} |}