Summary: Defining a template within a page
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Templates

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

* 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}}}

    {{row | name="Sally" | age="25" | salary="$50,000" }}
    {{row | name="Dick" | age="30" | salary="$75,000" }}
    {{row | name="Jane" | age="35" | salary="$100,000" }}

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to