Difference between revisions of "Template:In title/testcases"
imported>Cpiral (change nobullet t) |
imported>Cpiral |
||
| Line 55: | Line 55: | ||
=== Substituted form === | === Substituted form === | ||
| − | pre {{ | + | pre <!-- Output a <div class= ...> if a bullet is needed (the default), else output a <span class= ...> |
| + | --><{{#ifeq: on | {{ yesno-yes | no | yes = on }} | div | span }} class="plainlinks selfreference <!-- | ||
| + | If visibility in print is wanted, the bullet or label will not get the HTML "noprint" attribute. | ||
| + | -->{{#ifeq: on | {{ yesno-no | {{{print}}} | yes = on }} | " | noprint" }}><!-- | ||
| + | 1) used in articles, since it now has "noprint" to disappear in print media | ||
| + | 2) used as internal wikilink, since it hides the external-link arrow | ||
| + | -->{{#ifeq: on | {{ yesno-yes | no | yes = on }} || * }}<!-- | ||
| + | -->[<!-- brackets that creates the link, no space allowed after it | ||
| + | -->{{fullurl:Special:Search|search=<!--create the URL-style link to search, with a query |parameter= called "search" | ||
| + | -->{{urlencode:~"{{PAGENAME}}"<!-- Search. Encode the query for safety with search syntax like tilde ~ character | ||
| + | -->}}}}<!-- end fullurl and urlencode | ||
| + | --> <!-- Now for the label. It is created by a space | ||
| + | -->All pages with titles containing ''{{PAGENAME}}''<!-- | ||
| + | -->]<!-- closing bracket that creates the link | ||
| + | --></{{#ifeq: on | {{ yesno-yes | no | yes = on }} | div | span }}> post | ||
| − | pre {{ | + | pre <!-- Output a <div class= ...> if a bullet is needed (the default), else output a <span class= ...> |
| + | --><{{#ifeq: on | {{ yesno-yes | yes | yes = on }} | div | span }} class="plainlinks selfreference <!-- | ||
| + | If visibility in print is wanted, the bullet or label will not get the HTML "noprint" attribute. | ||
| + | -->{{#ifeq: on | {{ yesno-no | {{{print}}} | yes = on }} | " | noprint" }}><!-- | ||
| + | 1) used in articles, since it now has "noprint" to disappear in print media | ||
| + | 2) used as internal wikilink, since it hides the external-link arrow | ||
| + | -->{{#ifeq: on | {{ yesno-yes | yes | yes = on }} || * }}<!-- | ||
| + | -->[<!-- brackets that creates the link, no space allowed after it | ||
| + | -->{{fullurl:Special:Search|search=<!--create the URL-style link to search, with a query |parameter= called "search" | ||
| + | -->{{urlencode:~"{{PAGENAME}}"<!-- Search. Encode the query for safety with search syntax like tilde ~ character | ||
| + | -->}}}}<!-- end fullurl and urlencode | ||
| + | --> <!-- Now for the label. It is created by a space | ||
| + | -->All pages with titles containing ''{{PAGENAME}}''<!-- | ||
| + | -->]<!-- closing bracket that creates the link | ||
| + | --></{{#ifeq: on | {{ yesno-yes | yes | yes = on }} | div | span }}> post | ||
Revision as of 06:07, 31 December 2015
| 42px | This is the template test cases page for the sandbox of Template:In title. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Contents
How it previews:
Bulleted item
{{in title/sandbox}} →
{{in title/sandbox| '''label '''}} →
{{in title/sandbox|"Page name"|bullet=1}} →
{{in title/sandbox|"Page name"|bullet=true}} →
{{in title/sandbox|"Page name"|bullet=y}} →
{{in title/sandbox|"Page name"|bullet=yes}} →
Inline
Pre post.
Pre post.
Here's how it previews: All pages with titles containing In title/testcases
Bulleted item
{{in title}} → All pages with titles containing In title/testcases
{{in title| '''label '''}} → All pages with titles containing label
{{in title|"Page name"|bullet=1}} → All pages with titles containing Page name
{{in title|"Page name"|bullet=true}} → All pages with titles containing Page name
{{in title|"Page name"|bullet=y}} → All pages with titles containing Page name
{{in title|"Page name"|bullet=yes}} → All pages with titles containing Page name
Inline
Pre All pages with titles containing In title/testcases post.
Pre All pages with titles containing label test post.
Substituted form
pre
pre
post