Template:Documentation/doc: Difference between revisions

Removing TOC from the main page documentation
(Creating documentation subpage for the documentation template. Documentationception?)
 
(Removing TOC from the main page documentation)
Line 18: Line 18:
Writing a documentation subpage is pretty much like writing a normal article - you just explain what the template does - an article on the template, if you will. You can even edit the templatedata in the documentation subpage, and have it be used by the template itself! The editor even supports that. You can see an example of that in the documentation subpage for this template.
Writing a documentation subpage is pretty much like writing a normal article - you just explain what the template does - an article on the template, if you will. You can even edit the templatedata in the documentation subpage, and have it be used by the template itself! The editor even supports that. You can see an example of that in the documentation subpage for this template.


That said, there's one caveat when it comes to /doc subpages - categorizing. You may not want to have your template share categories with its /doc subpage. To go around that you simply use <nowiki><noinclude></nowiki> tags for what the documentation subpage should have, and <nowiki><includeonly></nowiki> tags for the template's categories. You can see an example at the end of this template's /doc subpage.
That said, there's one major caveat when it comes to /doc subpages - categorizing. You may not want to have your template share categories with its /doc subpage. To go around that you simply use <nowiki><noinclude></nowiki> tags for what the documentation subpage should have, and <nowiki><includeonly></nowiki> tags for the template's categories. You can see an example at the end of this template's /doc subpage.


==Template Data==
==Template Data==
Line 52: Line 52:
</templatedata>
</templatedata>


<includeonly>[[Category:Templates]]</includeonly>
<includeonly>[[Category:Templates]]__NOTOC__</includeonly>
<noinclude>[[Category:Documentation subpages]]</noinclude>
<noinclude>[[Category:Documentation subpages]]</noinclude>