Difference between revisions of "Template:Documentation/core"

From Halachipedia
Jump to: navigation, search
(Oh, that reported /doc talkpages that were used as normal talkpages.)
(Using a special preload page for /doc pages in File space.)
Line 13: Line 13:
 
     | [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [{{purge|purge}}]  
 
     | [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [{{purge|purge}}]  
 
     | <!--/doc doesn't exist-->
 
     | <!--/doc doesn't exist-->
       [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload=Template:Documentation/preload}} create]]
+
       [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload={{
 +
        #ifeq: {{SUBJECTSPACE}} | {{ns:File}}
 +
        | Template:Documentation/preload-filespace
 +
        | Template:Documentation/preload
 +
        }} }} create]]
 
     }}</span>
 
     }}</span>
 
   }} <span style="{{#if: {{{heading-style|}}}
 
   }} <span style="{{#if: {{{heading-style|}}}
Line 47: Line 51:
 
<div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.-->
 
<div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.-->
 
</div><!--End of green doc box--><!--
 
</div><!--End of green doc box--><!--
   Small box below for the doc meta-data.
+
   Small box below for the doc meta-data:
 
-->{{#if:  
 
-->{{#if:  
 
   <!--Check if we should show the small box-->
 
   <!--Check if we should show the small box-->
Line 69: Line 73:
 
       The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br>
 
       The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br>
 
     }}<!--  
 
     }}<!--  
       Add links to /sandbox and /testcases when appropriate  
+
       Add links to /sandbox and /testcases when appropriate:
 
  -->{{#switch: {{SUBJECTSPACE}}
 
  -->{{#switch: {{SUBJECTSPACE}}
 
     | {{ns:User}}
 
     | {{ns:User}}
Line 130: Line 134:
  
 
   | #default =  
 
   | #default =  
 
 
     <!--Check if there are /sandbox and /testcases  
 
     <!--Check if there are /sandbox and /testcases  
 
         in talk space that are too large to be redirects,  
 
         in talk space that are too large to be redirects,  
         when the subpages should be in talk space-->
+
         when the subpages should be in subject space-->
 
     {{#ifexpr:  
 
     {{#ifexpr:  
 
       {{PAGESIZE:
 
       {{PAGESIZE:

Revision as of 18:49, 11 February 2010

[edit] [purge] 50px Template documentation

This is the {{documentation/core}} sub-template.

Do not use this template directly, use {{documentation}} instead.

Template:Tlf calls {{documentation/core2}} which in turn calls this template. This template holds most of the code for Template:Tlf, while Template:Tlf and Template:Tlf do parameter preprocessing. Thus simplifying the code.

Technical details

This sub-template currently expects these parameters:

{{documentation/core
| heading = {{{heading|¬}}}   <!--Note that the "¬" is necessary 
     so we can detect the difference between empty and undefined-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}    <!--Text instead of a /doc page-->
| link box = {{{link box|}}}  <!--So "link box=off" works-->

| docpage =     <!--Full pagename of the doc page-->
| doc exist =   <!--"yes" if the doc page exists, empty string if not-->
| docname fed = <!--"yes" if a docname was manually fed-->

| sandbox =     <!--Full pagename of the /sandbox-->
| testcases =   <!--Full pagename of the /testcases-->

| template page =   <!--Full pagename where the {{documentation}}
    template is placed, but without ending /sandbox or /testcases.
    Note: Unfortunately might not be the "correct" namespace if 
    the template is in subject space and the {{documentation}} 
    template is in talk space or the other way around.-->
}}

For more documentation see {{documentation}}. pt:Predefinição:Documentation/core