Template:Examples Box/documentation: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '__NOTOC__<div style="background-color: #DBE9F4;"><noinclude>Category: Template Documentation</noinclude> ={{Font|Template Documentation|16|Calibri|bold|black}}= This serie…')
 
No edit summary
Line 4: Line 4:
={{Font|Template Documentation|16|Calibri|bold|black}}=
={{Font|Template Documentation|16|Calibri|bold|black}}=


This series of templates is used to create a "See it in action box," which contains links to examples in other wiki pages or in external websites, such as ReliaSoft.com and ReliaSoft.tv. We will use this box when we have examples that are relevant to a particular topic but it’s not appropriate to integrate the example directly into the reference book chapter. For an example of how this element has been integrated into a reference book chapter, see http://reliawiki.org/index.php/Repairable_Systems_Analysis_Through_Simulation#Discussion. '''''Note that this example is a live page on ReliaWiki. Please do not edit it or use it to experiment with templates!'''''
This template is one of five in a series of templates used to create a "See it in action box," which contains links to examples in other wiki pages or in external websites, such as ReliaSoft.com and ReliaSoft.tv. We will use this box when we have examples that are relevant to a particular topic but it’s not appropriate to integrate the example directly into the reference book chapter. For an example of how this element has been integrated into a reference book chapter, see [[Repairable_Systems_Analysis_Through_Simulation#Discussion|Repairable Systems Analysis Through Simulation]]. '''''Note that this example is a live page on ReliaWiki. Please do not edit it or use it to experiment with the templates!'''''


This template in particular (i.e, Template:Examples Box) contains the settings for the box itself, such as horizontal lines, shading, etc. There are four other templates that serve as the content for the box. Complete instructions for building the box are given below.
This template in particular (i.e, Template:Examples Box) contains the settings for the box itself, such as horizontal lines, shading, etc. There are four other templates that serve as the content for the box. Complete instructions for building the box are given below.
Line 23: Line 23:
The code inserts the box template and the four other "bullet" templates that serve as the content for the box. You can then choose which of the four “bullet” templates are appropriate for the situation and then duplicate/delete the rows as needed. You can also customize the content for any other situation by manually entering the necessary code to create the custom bullet.
The code inserts the box template and the four other "bullet" templates that serve as the content for the box. You can then choose which of the four “bullet” templates are appropriate for the situation and then duplicate/delete the rows as needed. You can also customize the content for any other situation by manually entering the necessary code to create the custom bullet.


Once you have decided which "bullet" template you want to keep or add, you will need to configure the parameters of each template. In the code above, all the required parameters are shown in ALL CAPS.
Once you have decided which "bullet" template(s) you want to keep, you will need to configure its parameters. In the code above, all the required parameters are shown in ALL CAPS.


Below are descriptions of the "bullet" templates and their parameters:
Below are descriptions of the "bullet" templates and their parameters:
Line 48: Line 48:
'''Example '''  
'''Example '''  


The following example shows the complete box for a BlockSim page:
The following example shows what the complete box might look like for a BlockSim topic. The code used to create the box is also shown below.


<pre>
{{Examples_Box|BlockSim_Examples|<p>More application examples are available! See also:</p>
{{Examples_Box| BlockSim_Examples|<p>More application examples are available! See also:</p>
{{Examples Link|BlockSim_Example:_CM_Triggered_by_Subsystem_Down|This is a link to another wiki page}}<nowiki/>
{{Examples Link|BlockSim_Example:_CM_Triggered_by_Subsystem_Down|This is a link to another wiki page}}<nowiki/>
{{Examples Link External|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|This is a link to an example on ReliaSoft.com}}<nowiki/>
{{Examples Link External|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|This is a link to an example on ReliaSoft.com}}<nowiki/>
{{Examples Movie|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|This is an example with video only}}<nowiki/>
{{Examples Movie|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|This is an example with video only}}<nowiki/>
{{Examples Both|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|Reliability Analysis of a Storage Cluster System|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|Watch the video...}}<nowiki/>
{{Examples Both|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|Reliability Analysis of a Storage Cluster System|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|Watch the video...}}<nowiki/>}}
}}
</pre>


This code is rendered as follows:
<pre style="white-space: pre-wrap;
{{Examples_Box|BlockSim_Examples|<p>More application examples are available! See also:</p>
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
{{Examples_Box| BlockSim_Examples|<p>More application examples are available! See also:</p>
{{Examples Link|BlockSim_Example:_CM_Triggered_by_Subsystem_Down|This is a link to another wiki page}}<nowiki/>
{{Examples Link|BlockSim_Example:_CM_Triggered_by_Subsystem_Down|This is a link to another wiki page}}<nowiki/>
{{Examples Link External|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|This is a link to an example on ReliaSoft.com}}<nowiki/>
{{Examples Link External|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|This is a link to an example on ReliaSoft.com}}<nowiki/>
Line 66: Line 67:
{{Examples Both|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|Reliability Analysis of a Storage Cluster System|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|Watch the video...}}<nowiki/>
{{Examples Both|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|Reliability Analysis of a Storage Cluster System|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|Watch the video...}}<nowiki/>
}}
}}
</pre>
.

Revision as of 15:56, 5 June 2014


Template Documentation

This template is one of five in a series of templates used to create a "See it in action box," which contains links to examples in other wiki pages or in external websites, such as ReliaSoft.com and ReliaSoft.tv. We will use this box when we have examples that are relevant to a particular topic but it’s not appropriate to integrate the example directly into the reference book chapter. For an example of how this element has been integrated into a reference book chapter, see Repairable Systems Analysis Through Simulation. Note that this example is a live page on ReliaWiki. Please do not edit it or use it to experiment with the templates!

This template in particular (i.e, Template:Examples Box) contains the settings for the box itself, such as horizontal lines, shading, etc. There are four other templates that serve as the content for the box. Complete instructions for building the box are given below.

Usage

To insert the box and its contents, copy and paste the following code:

{{Examples Box|WIKI PAGE|<p>More application examples are available! See also:</p> 
{{Examples Link|WIKI PAGE|ANCHOR TEXT}}<nowiki/>
{{Examples Link External|HTML PAGE|ANCHOR TEXT}}<nowiki/>
{{Examples Movie|VIDEO URL|ANCHOR TEXT}}<nowiki/>
{{Examples Both|HTML URL|ANCHOR TEXT1|VIDEO URL|ANCHOR TEXT2}}<nowiki/>
}}

The code inserts the box template and the four other "bullet" templates that serve as the content for the box. You can then choose which of the four “bullet” templates are appropriate for the situation and then duplicate/delete the rows as needed. You can also customize the content for any other situation by manually entering the necessary code to create the custom bullet.

Once you have decided which "bullet" template(s) you want to keep, you will need to configure its parameters. In the code above, all the required parameters are shown in ALL CAPS.

Below are descriptions of the "bullet" templates and their parameters:

a) Examples Link is for linking to an example in another wiki page. It has 2 parameters:
  • WIKI PAGE = the name of the wiki page (e.g., Page_Name).
  • ANCHOR NAME = the name of the example
b) Examples Link External is for linking to an example that's posted on another website such as ReliaSoft.com. It has 2 parameters:
c) Examples Movie is for linking to an example that's only available as a video on ReliaSoft.tv. It has 2 parameters:
d) Examples Both is for an example that's available both on an external website (e.g., ReliaSoft.com) and on ReliaSoft.tv. It has 4 parameters:


Example

The following example shows what the complete box might look like for a BlockSim topic. The code used to create the box is also shown below.

{{Examples_Box| BlockSim_Examples|<p>More application examples are available! See also:</p>
{{Examples Link|BlockSim_Example:_CM_Triggered_by_Subsystem_Down|This is a link to another wiki page}}<nowiki/>
{{Examples Link External|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|This is a link to an example on ReliaSoft.com}}<nowiki/>
{{Examples Movie|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|This is an example with video only}}<nowiki/>
{{Examples Both|http://www.reliasoft.com/BlockSim/examples/rc1/index.htm|Reliability Analysis of a Storage Cluster System|http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html|Watch the video...}}<nowiki/>
}}


.