User:Robbiemuffin/Templates/DT section

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Documentation[edit] [history] [purge]

{{User:Robbiemuffin/Templates/DT main}} — sections for Documentation Template

Purpose[edit | edit source]

Convenience method for adding sections to a DT main-styled documentation page

Specification[edit | edit source]

== {{{title|}}} ==
<div style="margin-left: 2%; margin-right: 2%; text-align: justify; text-justify: newspaper">



Usage[edit | edit source]

{{ subst:  User:Robbiemuffin/Templates/DT section | title=section_title | content=section_preinsertion_content }}

title Title text for the Section.
contents Convenience method, puts contents at the insertion point.

Example[edit | edit source]

Replacing the two sections that default with a new documentation page with:

{{subst:User:Robbiemuffin/Templates/DT main|title=Some documentation|content=

{{subst:User:Robbiemuffin/Templates/DT section|title=Purpose}}
{{subst:User:Robbiemuffin/Templates/DT section|title=Specification}}
{{subst:User:Robbiemuffin/Templates/DT section|title=Usage}}
{{subst:User:Robbiemuffin/Templates/DT section|title=Example}}
{{subst:User:Robbiemuffin/Templates/DT section|title=See Also}}


-- generated this page. (Save and load the page, then come back and edit the documentation to fill it.)

Since this works through substitution, you can use this method at any time to add new sections: If, later on, I want to add a new section after Usage, I could edit the USage section and add this code:

{{subst:User:Robbiemuffin/Templates/DT section|title=My New Section}}

Calling this template without substitutions (and preferably without options) gives a quick short hand to edit the actual template ... which you should never do unless you will revert the changes afterwards. This is a convenience method so you can tune your sections in a one-time-only fashion.

See Also[edit | edit source]

this page was brought to you by an Ajax hacker