User:Robbiemuffin/Templates/DT section
{{User:Robbiemuffin/Templates/DT main}} — sections for Documentation Template
Purpose
editConvenience method for adding sections to a DT main-styled documentation page
Specification
edit== {{{title|}}} == <div style="margin-left: 2%; margin-right: 2%; text-align: justify; text-justify: newspaper"> {{{content|}}} </div>
Usage
edit{{ 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
editReplacing 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.