Template:Test: Difference between revisions

mNo edit summary
m Removed claim on Page "B". Testing complete.
Tag: Manual revert
 
(63 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<noinclude>
{{#if: {{{clear|}}} | <div style="clear: both;"></div> }}<!--
== Description ==
--><div {{#if:{{{id|}}}|id="{{{id}}}"}} class="notice hide-for-print {{{class|curved}}} {{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||dismissible-notice}}|dismissible-notice}}" style="width: {{#if:{{{width|}}}{{{width}}}|{{{width}}}|50%}};<!--
This page contains various subpages for testing out new templates or for making improvements to existing templates without altering the live version.
  -->{{#switch:{{{align|center}}}|left=margin: 0.3em 0.3em 0.3em 0;|right=margin: 0.3em 0 0.3em auto;|#default=margin: 0.3em auto;}};<!--
  -->padding: 0.5em; text-align: center; font-size: {{{font-size|1em}}}; {{{style}}};<!--
  -->{{#if: {{{color|}}} | background-color: {{{color}}}; {{#if: {{{border|}}} | border: {{{border}}}; }} | border: 1px solid black; }}<!--
-->">
  <div style="position: relative;"><!--
    -->{{#if:{{{dismiss|}}}|{{#ifeq:{{{dismiss}}}|no||<div class="dismiss-button" style="position: absolute; top: -0.85rem; right: -0.25rem; cursor: pointer; padding: 5px; font-size: 21px;">×</div>}}| <div class="dismiss-button" style="position: absolute; top: -0.85rem; right: -0.25rem; cursor: pointer; padding: 5px; font-size: 21px;">×</div>}}<!--
    -->{{#if:{{{b|}}}|<div class="notice-main-text" style="font-weight:bold;">{{{b}}}</div>}}<!--
    --><div class="{{#if:{{{b|}}}|hide-for-multinotice|notice-main-text}}" style="white-space: normal;">{{{1}}}</div><!--
  --></div><!--
--></div>
</includeonly><noinclude>
This page is for testing out new templates or for making alterations to live templates without damaging them.


This is a bit of text.
'''PLEASE DO NOT USE THIS PAGE FOR TESTING. USE ONE OF THE SUBPAGES LISTED BELOW.'''
{{test
|b=This is a test
|1=this is also a test
|color=#bdcca1
|align=left
|width=100%
}}
This is a bit of text
{{test
|1=this is also a test
|color=#bdcca1
|dismiss=no
}}


The Notice template is a parent template that helps build [[:Category: Notices|Notice Templates]]. This template should never be used in its raw form on an article, but instead should be used to create new templates.
== Usage ==
Below is a [[:Template:Test#Subpages|list of subpages]] available for testing. To ensure no interference during your testing process, you must claim a subpage. This warns other users not to use that page.  


== Parameters ==
To claim a page, change <code>[Unclaimed]</code> to <code><nowiki>[Claimed —~~~~]</nowiki></code>, this will add your timestamped signature. Additionally, on the claimed subpage, please add the {{t|Claim}} notice to the top of the page.


{{{style}}} - allows the user to set various style elements of the notice box, like background color
When you are finished with your testing, copy your template to its new home and reset the subpage back to its original state. On this page, change <code><nowiki>[Claimed —~~~~]</nowiki></code> back to <code>[Unclaimed]</code>.


{{{b}}} - optional parameter that creates a bolded title for the notice box
If all subpages are in use, please create a new subpage by appending <code>/X</code> to this page's url, replacing "<code>X</code>" with the next letter in the sequence established below. Once the new subpage is created, please add it to the list below.


{{{1}}} - the regular text in the notice box
== Subpages ==
 
To call a template on a subpage, begin your call with <code><nowiki>{{test/X</nowiki></code>, replacing "<code>X</code>" with the appropriate subpage. Note that the subpage's letter must be capitalized to call correctly.
== Examples ==
{{columns|count=2|
 
* [[Template:Test/A|Page A]] [Claimed —[[User:TheRoman|TheRoman]] ([[User talk:TheRoman|talk]]) 19:24, 11 April 2025 (UTC)]
Here is one example of a potential notice box.
* [[Template:Test/B|Page B]] [Unclaimed]
 
* [[Template:Test/C|Page C]] [Unclaimed]
This code on the template page
* [[Template:Test/D|Page D]] [Unclaimed]
<code><nowiki>
* [[Template:Test/E|Page E]] [Unclaimed]
{{notice|style=background-color:#CCA;
* [[Template:Test/F|Page F]] [Unclaimed]
|b=This is the bold title of the box!
|1=This is the regular text with more detail
}}
}}
</nowiki></code>
produces this when the template is used:
{{test|style=background-color:#CCA;
|b=This is the bold title of the box!
|1=This is the regular text with more detail
}}
Here's another example, this time without the bold line at the top.
This code on the template page
<code><nowiki>
{{notice|style=background-color:#FAA;
|1=This notice doesn't have a bold title
}}
</nowiki></code>
{{notice|style=background-color:#FAA;
|1=This notice doesn't have a bold title
|dismiss=no
}}
:'''Use <code>|clear=yes</code> if the notice is interfering with other elements.
{{test
|b=This is a test
|1=this is also a test
|color=#bdcca1
|width=80%
|align=left
}}{{quote
|This is a test
|this is a test
}}
{{example
|name=Beth Brower
|image=Beth Brower-2.jpg
|caption=Our Undaunted Author
|profession=Author, Owner of Cat
|titles=''The Right Honorable Beth''
}}


[[Category:Templates]]
[[Category:Templates]]