Template:Examples Box/documentation: Difference between revisions
Lisa Hacker (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
={{Font|Template Documentation|16|Calibri|bold|black}}= | ={{Font|Template Documentation|16|Calibri|bold|black}}= | ||
The Examples Box template is 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. | |||
Use this box to list examples that are relevant to the particular topic but are not appropriate for the reference book (e.g., examples that demonstrate how to perform the analysis in the software). | |||
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!''''' | |||
==Usage== | ==Usage== | ||
There are five templates in this series. This template in particular (i.e., Template:Examples Box) contains the settings for the box itself, such as horizontal lines, shading, etc. The other four templates contain the settings for the bulleted contents of the box. | |||
To | To use the templates, copy and paste the following code: | ||
<pre> | <pre> | ||
{{Examples Box| | <div class="noprint"> | ||
{{Examples Link| | {{Examples Box|EXAMPLE_PAGE|<p>More application examples are available! See also:</p> | ||
{{Examples Link External| | {{Examples Link|LINK|ANCHOR_TEXT}}<nowiki/> | ||
{{Examples Movie| | {{Examples Link External|URL|ANCHOR_TEXT}}<nowiki/> | ||
{{Examples Both| | {{Examples Movie|URL|ANCHOR_TEXT}}<nowiki/> | ||
}} | {{Examples Both|HTML_URL|ANCHOR_TEXT1|VIDEO_URL|ANCHOR_TEXT2}}<nowiki/>}} | ||
</div> | |||
</pre> | </pre> | ||
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 added the box code to your page, you will need to configure its parameters | Once you have added the box code to your page, you will need to configure its parameters. Below are descriptions of the required parameters: | ||
:a) '''Examples Box''' contains the settings for the box itself, such as horizontal lines, shading, etc. It has 1 parameter: | :a) '''Examples Box''' contains the settings for the box itself, such as horizontal lines, shading, etc. It has 1 parameter: | ||
::* | ::* EXAMPLE_PAGE = the name of the wiki page that contains the application's examples index page (e.g., [[BlockSim Examples]]) | ||
:b) '''[[Template:Examples Link|Examples Link]]''' is for linking to an example in another wiki page. It has 2 parameters: | :b) '''[[Template:Examples Link|Examples Link]]''' is for linking to an example in another wiki page. It has 2 parameters: | ||
::* | ::* LINK = the name of the wiki page (e.g., [[BlockSim Allocation Analysis Example]]). | ||
::* | ::* ANCHOR_TEXT = the name of the example that should be displayed for the wiki page (e.g., Allocation Example) | ||
:c) '''[[Template:Examples Link External|Examples Link External]]''' is for linking to an example that's posted on another website such as ReliaSoft.com. It has 2 parameters: | :c) '''[[Template:Examples Link External|Examples Link External]]''' is for linking to an example that's posted on another website such as ReliaSoft.com. It has 2 parameters: | ||
::* | ::*URL = the URL of the example on the external website (e.g., http://www.reliasoft.com/BlockSim/examples/rc1/index.htm). | ||
::* | ::*ANCHOR_TEXT = the name of the example that should be displayed for the link. | ||
:d) '''[[Template:Examples_Movie|Examples Movie]]''' is for linking to an example that's only available as a video on ReliaSoft.tv. It has 2 parameters: | :d) '''[[Template:Examples_Movie|Examples Movie]]''' is for linking to an example that's only available as a video on ReliaSoft.tv. It has 2 parameters: | ||
::* | ::*URL = the URL for the ReliaSoft.tv web page (e.g., http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html). | ||
::* | ::*ANCHOR_TEXT = the name of the example that should be displayed for the link (e.g., "Reliability of a Storage Cluster"). | ||
:e) '''[[Template:Examples Both|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: | :e) '''[[Template:Examples Both|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: | ||
::* | ::*HTML_URL = The URL for the HTML version of the example (e.g., http://www.reliasoft.com/BlockSim/examples/rc1/index.htm). | ||
::* | ::*ANCHOR_TEXT1 = The anchor text for the HTML version link (e.g., "Reliability Analysis of a Storage Cluster System"). | ||
::* | ::*VIDEO_URL = The URL for the video version of the example on ReliaSoft.tv (e.g., http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.htm). | ||
::* | ::*ANCHOR_TEXT2 = The anchor text for the video version link (e.g., "Watch the video..."). | ||
NOTE: The <code><nowiki><div class="noprint"></nowiki></code> in the template indicates that the box will NOT appear in the PDF version of the wiki page. The box does not render properly in PDF and is not very useful in printed materials anyway, so we've made the decision to exclude it from printing. | |||
==Example== | ==Example== | ||
Line 55: | Line 62: | ||
{{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 style="white-space: pre-wrap; | <pre style="white-space: pre-wrap; | ||
Line 61: | Line 69: | ||
white-space: -o-pre-wrap; | white-space: -o-pre-wrap; | ||
word-wrap: break-word;"> | word-wrap: break-word;"> | ||
{{Examples_Box| BlockSim_Examples|<p>More application examples are available! See also:</p> | <div class="noprint"> | ||
{{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/>}} | ||
}} | </div> | ||
</pre> | </pre> | ||
</div> | </div> |
Latest revision as of 19:00, 1 December 2015
Template Documentation
The Examples Box template is 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.
Use this box to list examples that are relevant to the particular topic but are not appropriate for the reference book (e.g., examples that demonstrate how to perform the analysis in the software).
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!
Usage
There are five templates in this series. This template in particular (i.e., Template:Examples Box) contains the settings for the box itself, such as horizontal lines, shading, etc. The other four templates contain the settings for the bulleted contents of the box.
To use the templates, copy and paste the following code:
<div class="noprint"> {{Examples Box|EXAMPLE_PAGE|<p>More application examples are available! See also:</p> {{Examples Link|LINK|ANCHOR_TEXT}}<nowiki/> {{Examples Link External|URL|ANCHOR_TEXT}}<nowiki/> {{Examples Movie|URL|ANCHOR_TEXT}}<nowiki/> {{Examples Both|HTML_URL|ANCHOR_TEXT1|VIDEO_URL|ANCHOR_TEXT2}}<nowiki/>}} </div>
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 added the box code to your page, you will need to configure its parameters. Below are descriptions of the required parameters:
- a) Examples Box contains the settings for the box itself, such as horizontal lines, shading, etc. It has 1 parameter:
- EXAMPLE_PAGE = the name of the wiki page that contains the application's examples index page (e.g., BlockSim Examples)
- b) Examples Link is for linking to an example in another wiki page. It has 2 parameters:
- LINK = the name of the wiki page (e.g., BlockSim Allocation Analysis Example).
- ANCHOR_TEXT = the name of the example that should be displayed for the wiki page (e.g., Allocation Example)
- c) Examples Link External is for linking to an example that's posted on another website such as ReliaSoft.com. It has 2 parameters:
- URL = the URL of the example on the external website (e.g., http://www.reliasoft.com/BlockSim/examples/rc1/index.htm).
- ANCHOR_TEXT = the name of the example that should be displayed for the link.
- d) Examples Movie is for linking to an example that's only available as a video on ReliaSoft.tv. It has 2 parameters:
- URL = the URL for the ReliaSoft.tv web page (e.g., http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.html).
- ANCHOR_TEXT = the name of the example that should be displayed for the link (e.g., "Reliability of a Storage Cluster").
- e) 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:
- HTML_URL = The URL for the HTML version of the example (e.g., http://www.reliasoft.com/BlockSim/examples/rc1/index.htm).
- ANCHOR_TEXT1 = The anchor text for the HTML version link (e.g., "Reliability Analysis of a Storage Cluster System").
- VIDEO_URL = The URL for the video version of the example on ReliaSoft.tv (e.g., http://www.reliasoft.tv/blocksim/appexamples/blocksim_app_ex_1.htm).
- ANCHOR_TEXT2 = The anchor text for the video version link (e.g., "Watch the video...").
NOTE: The <div class="noprint">
in the template indicates that the box will NOT appear in the PDF version of the wiki page. The box does not render properly in PDF and is not very useful in printed materials anyway, so we've made the decision to exclude it from printing.
Example
The following example shows what the box might look like for a BlockSim topic. The code used to build this example is also shown below.
More application examples are available! See also:
This is a link to another wiki page
This is a link to an example on ReliaSoft.com
This is an example with video only
Reliability Analysis of a Storage Cluster System or Watch the video...
<div class="noprint"> {{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/>}} </div>