Template:Documentation subpage/doc: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
{{Documentation subpage}} <!-- Adds [[Category:Documentation subpage]] -->
<div class="documentation-subpage" style="border: 1px solid #ccc; background-color: #f9f9f9; padding: 1em; margin: 1em 0;">
This is the <code>/doc</code> subpage of [[:Template:Documentation subpage]]. Any changes made here will reflect on the main template page.</div></noinclude>


<includeonly>This is a documentation page for [[:Template:Documentation subpage, which is used on <code>/doc</code> subpages to display that the current page is a [[:Category:Documentation subpages|documentation subpage]] of a template.</includeonly>
<noinclude>This template displays a notice that the current page is a [[:Category:Documentation subpages|documentation subpage]] of a template.</noinclude>


== Basic usage ==
== Basic usage ==
In most cases, the following code is sufficient on its own:
<pre><nowiki>
<pre><nowiki>
<noinclude>
<noinclude>
{{Documentation subpage}}
{{Documentation subpage}}
</noinclude></nowiki></pre>
However, a parameter may need to be specified if:
* The documentation is used on a page that is ''not'' a subpage. (e.g. test pages)
* The documentation is for a non-template page. (e.g. <code><nowiki>Module:</nowiki></code> pages)
* One or both pages use non-standard naming conventions. (e.g. <code><nowiki>{{Documentation subpage|Template:Artist/Album}}</nowiki></code>)
<pre><nowiki>
<noinclude>
{{Documentation subpage|The page you want to point to}}
</noinclude></nowiki></pre>
</noinclude></nowiki></pre>


Line 14: Line 23:
Below is a working example using a subpage at [[:Template:Documentation subpage/doc]]:
Below is a working example using a subpage at [[:Template:Documentation subpage/doc]]:


<div class="documentation-subpage" style="border: 1px solid #ccc; background-color: #f9f9f9; padding: 1em; margin: 1em 0;">
<blockquote>{{Documentation subpage}}</blockquote>
This is the <code>/doc</code> subpage of [[:Template:Documentation subpage]]. Any changes made here will reflect on the main template page.</div>
 
[[Category:Documentation subpages]]
[[Category:Documentation subpages]]
</noinclude>
</noinclude>
contributors, delete_pages, Interface administrators
4,701

edits