User:Johan G/Messagebox: Difference between revisions

Jump to navigation Jump to search
CSS style parameters might be useful; More headings
m (Oops again)
(CSS style parameters might be useful; More headings)
Line 20: Line 20:
  <nowiki>|</nowiki> ''image      =''  
  <nowiki>|</nowiki> ''image      =''  
  <nowiki>|</nowiki> ''image-width =''  
  <nowiki>|</nowiki> ''image-width =''  
<nowiki>|</nowiki> ''box-style  =''
<nowiki>|</nowiki> ''text-style  =''
<nowiki>|</nowiki> ''image-style =''
   
   
  <nowiki>|</nowiki> ''page        =''  
  <nowiki>|</nowiki> ''page        =''  
Line 25: Line 29:
  <nowiki>}}</nowiki>
  <nowiki>}}</nowiki>


;title:  Mandatory title for the messagebox that will be shown in bold, for example '''Danger''', '''Warning''', '''Caution''', '''Cleanup''', '''Note''', '''Notice''', '''Tip''', '''Hint''', '''Protected''' etc.
=== Mandatory parameters ===
;title:  Title for the messagebox that will be shown in bold, for example '''Danger''', '''Warning''', '''Caution''', '''Cleanup''', '''Note''', '''Notice''', '''Tip''', '''Hint''', '''Protected''' etc.


;text:  Mandatory text to be shown in the messagebox.
;text:  Text to be shown in the messagebox.


=== Parameters affecting the appearence ===
=== Parameters affecting the appearence ===
;style:  Optional style of the messagebox.  Valid values are '''immediate''', '''danger''', '''caution''', '''notice''', '''tip''' and '''protected'''. Defaults to '''notice'''.
Optional parameters affecting the appearance of the messagebox.


;one-lineOptional parameter to make the dialogue a one-liner if '''one-line=true'''.
;styleStyle of the messagebox.  Valid values are '''immediate''', '''danger''', '''caution''', '''notice''', '''tip''' and '''protected'''. Defaults to '''notice'''.


;imageOptional image or icon to use excluding the '''File:''' namespace prefix, for example '''image=Cleanup.png'''.  Instead of an image name a shortcut can be used.  When using the shortcuts the icons will automatically get the right colour for the style.  Valid icon shortcuts are: '''/!\''', '''(!)''', '''(?)''', '''(i)''', '''(x)''' and '''U''' (for padlock).
;one-lineParameter to make the dialogue a one-liner if '''one-line=true'''.


;image-width:  Optional width of the image.  Defaults to 40 pixels or for one-liners 24 pixels.
;image:  Image or icon to use excluding the '''File:''' namespace prefix, for example '''image=Cleanup.png'''.  Instead of an image name a shortcut can be used.  When using the shortcuts the icons will automatically get the right colour for the style.  Valid icon shortcuts are: '''/!\''', '''(!)''', '''(?)''', '''(i)''', '''(x)''' and '''U''' (for padlock).
 
;image-width:  Width of the image.  Defaults to 40 pixels or for one-liners 24 pixels.
 
=== CSS Style parameters ===
Optional parameters allowing cascading style sheet (CSS) style attributes to be used.  These will override the style of the messagebox.  Use sparingly and only when needed.
 
;box-style: CSS attributes applied to the box.
 
;text-style:  CSS attributes applied to the text cell.
 
;image-style:  CSS attributes applied to the image cell.


=== Parameters for demonstration and testing ===
=== Parameters for demonstration and testing ===
;page:  Wiki page to be used for demonstration and debugging purposes.  Use <code><nowiki>page = {{{page|}}}</nowiki></code> to forward this behaviour to a template.
Optional parameters for demonstration and testing.
 
;page:  Wiki page.  Use <code><nowiki>page = {{{page|}}}</nowiki></code> to forward this behaviour to a template.


;nocat:  If '''nocat=true''' pages are not categorized, if '''nocat=false''' pages are always categorized, and if '''nocat''' is empty or undefined only pages in the template namespace are categorised.
;nocat:  If '''nocat=true''' pages are not categorized, if '''nocat=false''' pages are always categorized, and if '''nocat''' is empty or undefined only pages in the template namespace are categorised.

Navigation menu