Template:Exp a

I put this template together to show how you could use one template to make all your box templates. Since this is called "Exp a" for say the Template:Delete you just put

{{Exp a|Bluebox
|''This page will be deleted{{ #if: {{{1|}}} |, because {{{1}}}|. }}''
}}

Notice that in the script on this page for "Bluebox" and "Graysmallbox" there was a {{{1}}} that was changed to {{{2}}} because the #switch takes over the {{{1}}}. This probably means that the {{{1}}} in Template:Delete would need to be changed to a {{{3}}}

In this form, this page kinda works like a CSS page which makes it easier to copy other boxes to create new ones, see all of them at once, make mass edits to all boxes, etc.

So you could create a template called "box" with all your box templates then reference it with {{box|Bluebox|Text here}}

This is what the script looks like, or you can just hit "edit"

{{#switch: {{{1|}}}

| Bluebox= <div style="padding:0.5em; margin-left:auto; margin-right:auto; background-color:#cedff2; width:80%; border:1px solid #a3bfb1">{{{2}}}</div>

| Bluebox2= <!---same as Bluebox just as wiki table instead of divs and "width:85%" instead of 80--->
{| style="padding:0.3em; margin-left:auto; margin-right:auto; background-color:#cedff2; width:80%; border:1px solid #a3bfb1"
| {{{2}}}
|}

| Bluefatbox= <div style="color: rgb(0,0,50); background-color: #E6F0F5; padding:2px; margin-left:auto; margin-right:auto; width:80%; border:3px solid #C8DCE6"><b>
<span style="font-size:125%"><center>{{{title}}}</center></span>
{{{body}}}</b></div>

| Graysmallbox= <center><div style="width:50%; background-color:rgb(220,220,222); border:solid gray 2px ">{{{2}}}</div></center>

| Redfatbox= <div style="color: rgb(20,0,0); padding:0.5em; margin-left:auto; margin-right:auto; background-color:rgb(250,150,150); width:80%; border:3px solid rgb(200,0,0)"><b>
<span style="font-size:125%"><center>{{{title}}}</center></span>
{{{body}}}</b></div>

}}

As you can see it would be easy to have small differences to accomodate and just create a "Bluebox1," "Bluebox2," and not have to create different templates.


Examples:


Here's the text


Here's the text


Here's the text
Here's the text