Template:Nowiki template demo/testcases
这是Template:Nowiki template demo及其沙盒的测试样例。刷新本页以更新内容。 如果这里有许多复杂的模板的用例,可能会因为MediaWiki的技术限制而出错。 您还可以用Special:展开模板来测试模板的使用效果。 您可以通过以下链接测试本模板在不同皮肤下的效果: |
Default format
{{Nowiki template demo|code=<nowiki>{{ombox|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}}</nowiki>}}
- Main template {{Nowiki template demo}}
{{ombox|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
- Sandbox template {{Nowiki template demo/sandbox}}
{{ombox|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
Inline format
{{Nowiki template demo|format=inline|code=<nowiki>{{3x|Lorem ipsum}}</nowiki>}}
{{3x|Lorem ipsum}}
→ Lorem ipsumLorem ipsumLorem ipsum
{{3x|Lorem ipsum}}
→ Lorem ipsumLorem ipsumLorem ipsum
Inline with prefix=#
{{Nowiki template demo|format=inline|prefix=#|code=<nowiki>{{3x|Lorem ipsum}}</nowiki>}}
{{3x|Lorem ipsum}}
→ Lorem ipsumLorem ipsumLorem ipsum
{{3x|Lorem ipsum}}
→ Lorem ipsumLorem ipsumLorem ipsum
Inline with prefix=:
{{Nowiki template demo|format=inline|prefix=:|code=<nowiki>{{3x|Lorem ipsum}}</nowiki>}}
{{3x|Lorem ipsum}}
→ Lorem ipsumLorem ipsumLorem ipsum
{{3x|Lorem ipsum}}
→ Lorem ipsumLorem ipsumLorem ipsum
Inline with output=nowiki
{{Nowiki template demo|format=inline|output=nowiki|code=<nowiki>{{URL | 1= http://www.example.com/path?section=17 }}</nowiki>}}
{{URL | 1= http://www.example.com/path?section=17 }}
→ <span class="url">[http://www.example.com/path?section=17 www<wbr/>.example<wbr/>.com<wbr/>/path?section=17]</span>
{{URL | 1= http://www.example.com/path?section=17 }}
→ <span class="url">[http://www.example.com/path?section=17 www<wbr/>.example<wbr/>.com<wbr/>/path?section=17]</span>
Inline with output=nowiki+
{{Nowiki template demo|format=inline|output=nowiki+|code=<nowiki>{{URL | 1= http://www.example.com/path?section=17 }}</nowiki>}}
{{URL | 1= http://www.example.com/path?section=17 }}
→ www.example .com /path?section=17 <span class="url">[http://www.example.com/path?section=17 www<wbr/>.example<wbr/>.com<wbr/>/path?section=17]</span>
{{URL | 1= http://www.example.com/path?section=17 }}
→ www.example .com /path?section=17 <span class="url">[http://www.example.com/path?section=17 www<wbr/>.example<wbr/>.com<wbr/>/path?section=17]</span>
Collapsible with default title
{{Nowiki template demo|collapsible=yes|code=<nowiki>{{URL | 1= http://www.example.com/path?section=17 }}</nowiki>}}
{{URL | 1= http://www.example.com/path?section=17 }}
{{URL | 1= http://www.example.com/path?section=17 }}
{{Nowiki template demo|collapsible=yes|template=URL|code=<nowiki>{{__TEMPLATENAME__ | 1= http://www.example.com/path?section=17 }}</nowiki>}}
{{URL | 1= http://www.example.com/path?section=17 }}
{{URL | 1= http://www.example.com/path?section=17 }}
Collapsible with "title" parameter
{{Nowiki template demo|collapsible=yes|title=Testing URL template|code=<nowiki>{{URL | 1= http://www.example.com/path?section=17 }}</nowiki>}}
{{URL | 1= http://www.example.com/path?section=17 }}
{{URL | 1= http://www.example.com/path?section=17 }}
Collapsible with "titlecode" parameter
{{Nowiki template demo|collapsible=yes|titlecode=yes|showcode=no|code=<nowiki>{{URL | 1= http://www.example.com/path?section=17 }}</nowiki>}}