「テンプレート:documentation」の版間の差分

提供:Tsubopedia
*>Mizusumashi
({{Documentation/sandbox|1=|content={{複雑なテンプレート}}|heading=このテンプレートについて|transcluded=not-show|sandbox-testcases=not-show}}としたときの不具合修正。)
編集の要約なし
 
(20人の利用者による、間の45版が非表示)
1行目: 1行目:
<noinclude>
<!--
{{Template sandbox notice}}
  Automatically add {{template sandbox notice}} when on a /sandbox page.
</noinclude><div
-->{{#ifeq: {{SUBPAGENAME}} | sandbox
class="template-documentation" style="clear: both; margin: 1em 0 1em 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 5px"><!--
| <div style="clear: both;"></div>{{template sandbox notice|{{{livepage|}}}}}
}}<!--
  Automatically add {{pp-template}} to protected templates.
-->{{template other
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
  | {{pp-template|docusage=yes}}
  | {{#if: {{PROTECTIONLEVEL:edit}}
    | {{pp-template|docusage=yes}}
    | <!--Not protected, or only semi-move-protected-->
    }}
  }}
}}<!--
  Start of green doc box.
-->{{documentation/start box2
| preload = {{{preload|}}}  <!--Allow custom preloads-->
| heading = {{{heading|¬}}}  <!--Empty but defined means no header-->
| heading-style = {{{heading-style|}}}
| content = {{#if:{{{content|}}}|1}}
 
<!--Some namespaces must have the /doc, /sandbox and /testcases
    in talk space-->
| docspace = {{documentation/docspace}}
 
| 1 = {{{1|}}}  <!--Other docname, if fed-->
 
<!--The namespace is added in /start box2-->
| template page = {{documentation/template page}}
 
}}<!-- Start content --><!--
  Start load the /doc content:
  Note: The line breaks between this comment and the next line are necessary
  so  "=== Headings ===" at the start and end of docs are interpreted.
-->
<!--
  End load the /doc content:
  Note: The line breaks between this comment and the previous line are necessary
  so  "=== Headings ===" at the start and end of docs are interpreted.
-->{{documentation/end box2
| preload = {{{preload|}}}  <!--Allow custom preloads-->
| content = {{#if:{{{content|}}}|1}}
| link box = {{{link box|}}}  <!--So "link box=off" works-->


styleパラメータは、本来はスタイルシートに記述するべき?
<!--Some namespaces must have the /doc, /sandbox and /testcases
…スタイルシートをどこから見つけたのか忘れてしまった。-->
     in talk space-->
{{
| docspace = {{documentation/docspace}}
  #if: {{{heading|解説}}}
 
  |<!-- headingがキャンセルされていない場合。
| 1 = {{{1|}}}  <!--Other docname, if fed-->
        headingが指定されていなければ、デフォルトの「解説」になる。
 
        {{Documentation|heading=}}のように設定することでキャンセルできる。
<!--The namespace is added in /end box2-->
  --><div style="padding-bottom: {{{heading-padding|3px}}}; border-bottom: 1px solid #aaa; margin-bottom: {{{heading-margin|1ex}}}"><span id="doc_editlinks" class="editsection plainlinks">{{
}}<!--
    #ifexist: {{{ 1 | {{Documentation/docname}} }}}
   End of green doc box
    |<!-- /doc がある
--><noinclude>
      -->[[{{
      fullurl: {{{ 1 | {{Documentation/docname}} }}}
      }} 閲覧]] [[{{
      fullurl: {{{ 1 | {{Documentation/docname}} }}}
      | action=edit
      }} 編集]]
     |<!-- /doc がない
      -->{{
      #if: {{{content|}}}
      |<!-- contentあり: 動作なし -->
      |<!-- contentなし
        -->[[{{
        fullurl: {{{ 1 | {{Documentation/docname}} }}}
        | action=edit&preload={{urlencode:{{{preload|Template:Documentation/preload}}}}}
        }} 編集]]
      }}<!-- #if: {{{content|}}} 閉じる -->
    }}<!-- #ifexist: {{{ 1 | {{Documentation/docname}} }}} 閉じる
  --></span><span style="{{{heading-style|font-size: 150%}}}">{{{heading|解説}}}</span></div><!-- ここまでheadingがキャンセルされていない場合 -->
   |<!-- headingがキャンセルされた場合: 動作なし -->
}}<!-- #if: {{{heading|解説}}} を閉じる
--><!--
  呼び出し先とサンドボックス・テストケースの誘導に使われるdivセクション。
  本来はスタイルシートに記述するべき?
--><div id="template_doc_page_transcluded" style="clear: both; border: none; margin: 0 0 0 2em; font-style: italic; font-size: 85%" ><!--
  呼び出し元処理の開始
-->{{
  #ifeq: {{{transcluded|show}}} | show
  |<!-- 呼び出し先を表示 -->{{
    #ifexist: {{{ 1 | {{Documentation/docname}} }}}
    |<!-- /doc がある場合
      -->この[[Help:テンプレートの説明文|解説]]は、[[{{{ 1 | {{Documentation/docname}} }}}]]から[[Help:テンプレート#テンプレートとは|呼び出されて]]います。<small style="font-style: normal">([{{
      fullurl: {{{ 1 | {{Documentation/docname}} }}}
      | action=edit
      }} 編集] &#124; [{{
      fullurl: {{{ 1 | {{Documentation/docname}} }}}
      | action=history
      }} 閲覧])</small><br />
    |<!-- /doc がない場合:動作なし -->
   }}
  |<!-- 呼び出し先を表示しない:動作なし -->
}}<!-- #ifeq: {{{transcluded|show}}} | show を閉じる。
--><!--
  サンドボックス・テストケース処理の開始
-->{{
  #switch: {{SUBPAGENAME}}
  |sandbox=<!-- sandbox -->
  |testcases=<!-- testcases -->
  |#default={{
    #switch: {{SUBJECTSPACE}}/{{{sandbox-testcases|show}}}
    | {{ns:template}}/show
    | {{ns:user}}/show = <!-- show /sandbox /testcases -->{{
      #ifexist: {{ #rel2abs: /sandbox }}
      | {{
        #ifexist: {{ #rel2abs: /testcases }}
        | <!-- /sandbox も /testcases も存在する
            -->このテンプレートには、[[/sandbox|サンドボックス]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /sandbox }}
          | action=edit
          }} 編集])</small>と[[/testcases|テストケース]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /testcases }}
          | action=edit
          }} 編集])</small>があります。<br />
        | <!-- /sandbox は存在するが、 /testcases が存在しない
            -->このテンプレートには、[[/sandbox|サンドボックス]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /sandbox }}
          | action=edit
          }} 編集])</small>がありますが、[[/testcases|テストケース]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /testcases }}
          | action=edit
          }} 編集])</small>はありません。<br />
        }}<!-- #ifexist: {{ #rel2abs: /testcases }} を閉じる -->
      | {{
        #ifexist: {{ #rel2abs: /testcases }}
        | <!-- /sandbox は存在しないが /testcases が存在する
            -->このテンプレートには、[[/testcases|テストケース]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /testcases }}
          | action=edit
          }} 編集])</small>がありますが、[[/sandbox|サンドボックス]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /sandbox }}
          | action=edit
          }} 編集])</small>はありません。<br />
        | <!-- /sandbox も /testcases も存在しない
            -->このテンプレートは、[[/sandbox|サンドボックス]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /sandbox }}
          | action=edit
          }} 編集])</small>も[[/testcases|テストケース]]<small style="font-style: normal">([{{
          fullurl: {{ #rel2abs: /testcases }}
          | action=edit
          }} 編集])</small>もありません。<br />
        }}<!-- #ifexist: {{ #rel2abs: /testcases }} を閉じる -->
      }}<!-- #ifexist: {{ #rel2abs: /sandbox }} を閉じる -->
    }}<!-- #switch: {{SUBJECTSPACE}}/{{{sandbox-testcases|show}}} を閉じる-->


}}<!-- #switch: {{SUBPAGENAME}} を閉じる --><!--
<!-- Add categories and interwikis to the /doc subpage, not here! -->
  呼び出し先とサンドボックス・テストケースの誘導に使われるdivセクションを閉じる。
</noinclude>
--></div><!--
-->{{ #if: {{{content|}}}
  |
{{{content}}}
  | {{
      {{ #ifexist: {{{ 1 | {{Documentation/docname}} }}}
        | {{{ 1 | {{Documentation/docname}} }}}
        | ns:0
      }}
    }}
}}
</div>

2014年10月29日 (水) 06:14時点における最新版

Documentation icon テンプレートの解説[[{{fullurl:</noinclude>:/doc| action=edit&preload=Template:Documentation/preload }} 作成]]