This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Template:ShowGraphic

From HL7Wiki
Jump to navigation Jump to search

Used with Template:NoGraphic to optionally display graphics within a template or page. The Parameters are:

  1. The name of the graphic image (with the extension)
  2. The "caption" for the image
  3. The commenting paragraph(s) that follow the image.
  4. Image width - Default:640px
  5. Image style - frame or thumb - Default:thumb
  6. Image alignment - Default:center

Example:

{{ShowGraphic|VocMnt681.gif|Example XML for '''removeCodesFromValueSet'''|The above 
example removes concept code 1003 (BITTER ALE) from the “OrderableAles” value set.}}</code>

NOTE

This is designed to be used in concert with the Template:NoGraphic. The latter returns NO content, but can be paired in an invocation in such a way as to allow a portion of a page written as a template to respond to a parameter determining whether or not to display graphics.

For example, VocMnt-ValueSetrev/RemoveCodes is a document in the "main" name space. It includes the following fragment:

{{{{{1|Show}}}Graphic|VocMnt681.gif|Example XML for '''removeCodesFromValueSet'''|The 
above example removes concept code 1003 (BITTER ALE) from the “OrderableAles” value set.

With a second paragraph, including '''bold text''', and a reference to 
[[VocMnt-BallotStatus|'''ballotStatus''']] among others.}}
Then another paragraph from the main stream. </code>

Now:

  • If this page is displayed as a page, there is no parameter and the default on parameter one causes the graphic to be displayed.
  • Likewise, if this page is displayed via a template with no parameters as {{:VocMnt-ValueSetRev/RemoveCodes}} with no parameters, the graphic will also be displayed.
  • However, if this page is included as a template with the first parameter set to "No" as in {{:VocMnt-ValueSetRev/RemoveCodes|No}} then the graphic display will be suppressed.