Difference between revisions of "Template:Highlighter template"

From Maths
Jump to: navigation, search
(Created page with "<span style="background-color:{{:Template data:Highlighting templates/{{{name|}}}/Main background colour}};padding-left:5px;padding-right:5px;<!-- -->{{#if:{{:Template data:H...")
 
(Overhaul to use highlighter template - it fills in the parameters based on data)
 
Line 1: Line 1:
<span style="background-color:{{:Template data:Highlighting templates/{{{name|}}}/Main background colour}};padding-left:5px;padding-right:5px;<!--
+
{{Highlighter
 
+
|bgcol={{PageOrDefault|Template data:Highlighting templates/{{{name|}}}/Main background colour|}}
-->{{#if:{{:Template data:Highlighting templates/{{{name|}}}/Mark text}}||border-left:5px solid {{:Template data:Highlighting templates/{{{name|}}}/Mark colour}};}}<!--
+
|markcol={{PageOrDefault|Template data:Highlighting templates/{{{name|}}}/Mark colour|}}
 
+
|marktext={{PageOrDefault|Template data:Highlighting templates/{{{name|}}}/Mark text|}}
-->"><!--
+
|default={{PageOrDefault|Template data:Highlighting templates/{{{name|}}}/Default text|}}
 
+
|msg={{{msg|}}}
-->{{#if:{{:Template data:Highlighting templates/{{{name|}}}/Mark text}}<!--
+
}}<noinclude>
    -->|<span style="padding-left:5px;padding-right:5px;margin-right:5px;background-color:{{:Template data:Highlighting templates/{{{name|}}}/Mark colour}};">{{:Template data:Highlighting templates/{{{name|}}}/Mark text}}</span><!--
+
==Parameters==
    -->|<!--
+
{| class="wikitable" border="1"
-->}}<!--
+
|-
 
+
! Name
-->{{{msg|}}}<!--
+
! Default
 
+
! Description
--></span>
+
! Comment
 +
|-
 +
! {{C|name}}
 +
| ''(nothing)''
 +
| The name of the highlighter in [[Template data:Highlighting templates]]
 +
* {{C|Template data:Highlighting templates/''Name''/''Field''}} will be used to read the data
 +
| Use {{C|debug}} to view the checks (transclude this on the highlighter page itself)
 +
* '''ENSURE YOU SET THIS'''
 +
|-
 +
! {{C|msg}}
 +
| ''(nothing)''
 +
| the text to highlight
 +
|
 +
|}
 +
</noinclude>{{#if:{{{debug|}}}|
 +
# [[Template data:Highlighting templates/{{{name|}}}/Main background colour]]
 +
# [[Template data:Highlighting templates/{{{name|}}}/Mark colour]]
 +
# [[Template data:Highlighting templates/{{{name|}}}/Mark text]]
 +
# [[Template data:Highlighting templates/{{{name|}}}/Default text]]
 +
|}}

Latest revision as of 07:00, 13 December 2016

Parameters

Name Default Description Comment
name (nothing) The name of the highlighter in Template data:Highlighting templates
  • Template data:Highlighting templates/Name/Field will be used to read the data
Use debug to view the checks (transclude this on the highlighter page itself)
  • ENSURE YOU SET THIS
msg (nothing) the text to highlight