Template:Mbox

From Know Islam
Jump to navigation Jump to search
This message box is using an invalid "type=" parameter and needs fixing.

Template Documentation for {{Mbox}}

Purpose

The {{Mbox}} template is a versatile template used to display message boxes that adapt based on the namespace. It helps standardize the appearance of notices, warnings, and other informational messages across different namespaces.

Usage

Basic Syntax

{{Mbox
| type       = <!-- Type of message (e.g., notice, warning, error) -->
| image      = <!-- Image filename (optional) -->
| imageright = <!-- Right-aligned image filename (optional) -->
| class      = <!-- Additional CSS classes (optional) -->
| style      = <!-- Custom inline CSS styles (optional) -->
| textstyle  = <!-- Custom inline CSS styles for text (optional) -->
| text       = <!-- Main message content -->
| small      = <!-- Display a smaller version (yes/no) -->
| smallimage = <!-- Small version image filename (optional) -->
| smallimageright = <!-- Right-aligned small version image filename (optional) -->
| smalltext  = <!-- Small version message content (optional) -->
| subst      = <!-- Substitution support (optional) -->
| date       = <!-- Date (optional) -->
| name       = <!-- Name (optional) -->
}}

Parameters

  • type: Specifies the type of message box. Common types include notice, warning, error, etc.
  • image: The filename of the image to be displayed on the left side of the message box. Optional.
  • imageright: The filename of the image to be displayed on the right side of the message box. Optional.
  • class: Additional CSS classes to apply to the message box. Optional.
  • style: Custom inline CSS styles for the message box. Optional.
  • textstyle: Custom inline CSS styles for the text within the message box. Optional.
  • text: The main content or message to be displayed in the message box. Required.
  • small: Specifies if a smaller version of the message box should be displayed. Accepts yes or no. Optional.
  • smallimage: The filename of the image to be used in the small version of the message box. Optional.
  • smallimageright: The filename of the right-aligned image for the small version. Optional.
  • smalltext: The message content for the small version. Optional.
  • subst: Indicates if the template should be substituted. Optional.
  • date: The date to be displayed in the message box. Optional.
  • name: A name for the message box, potentially for tracking or identification. Optional.

Examples

Basic Notice
{{Mbox
| type = notice
| text = This is a notice message.
}}
Warning with Image
{{Mbox
| type  = warning
| image = Warning_icon.png
| text  = This is a warning message.
}}
Custom Styled Message
{{Mbox
| type      = notice
| class     = custom-class
| style     = background-color: #eef; border: 1px solid #99f;
| textstyle = color: #00f;
| text      = This is a custom-styled notice message.
}}

See Also

  • {{Ambox}}: Article message boxes
  • {{Tmbox}}: Talk page message boxes
  • {{Imbox}}: File (image) message boxes
  • {{Cmbox}}: Category message boxes
  • {{Ombox}}: Other namespace message boxes

Maintenance

Ensure that the template documentation remains up-to-date with any changes made to the main template. Add categories and interwiki links to this documentation page as needed.