Template:Ombox/core/doc

From Know Islam
Jump to navigation Jump to search


Usage

The `

` template is used as a core component for creating message boxes (omboxes) with a variety of options for customization. It is typically used within other templates, such as `

`, to provide the underlying structure and functionality.

Parameters

  • `type`: The type of message box (e.g., notice, warning, error, etc.). This parameter is required.
  • `image`: The image to be displayed on the left side of the message box. Optional.
  • `imageright`: An optional image to be displayed on the right side of the message box. Optional.
  • `class`: Additional CSS classes for styling. Optional.
  • `style`: Custom inline styles for the message box. Optional.
  • `textstyle`: Custom inline styles for the text within the message box. Optional.
  • `text`: The main text content of the message box. This parameter is required.
  • `small`: If set to `yes`, a smaller version of the message box is created. Optional.
  • `smallimage`: An image specifically for the small version of the message box. Optional.
  • `smallimageright`: An image on the right side for the small version of the message box. Optional.
  • `smalltext`: The text content for the small version of the message box. If not provided, the `text` parameter is used. Optional.

Examples

Basic Usage

This example shows a basic usage of the `

` template:

{{Ombox/core
| type = notice
| text = This is a notice message.
}}

Using Images

You can add an image to the message box:

{{Ombox/core
| type  = warning
| image = [[File:Example.png|40px]]
| text  = This is a warning with an image.
}}

Smaller Version

This example shows how to use the smaller version of the message box:

{{Ombox/core
| small = yes
| type  = error
| text  = This is a small error message.
}}

Custom Styles

You can customize the styles of the message box:

{{Ombox/core
| type      = success
| style     = background-color: #DFF2BF;
| textstyle = color: green;
| text      = This is a success message with custom styles.
}}

See Also

  • `

    ` – The main template for creating message boxes.

    Template Data

    This template uses TemplateData for use with the VisualEditor and other tools.

    A core template to create message boxes with customizable content and styles.

    Template parameters

    ParameterDescriptionTypeStatus
    typetype

    The type of message box (e.g., notice, warning, error).

    Stringrequired
    texttext

    The main text content of the message box.

    Stringrequired
    imageimage

    The image to be displayed on the left side of the message box.

    Stringoptional
    imagerightimageright

    An image to be displayed on the right side of the message box.

    Stringoptional
    classclass

    Additional CSS classes for styling.

    Stringoptional
    stylestyle

    Custom inline styles for the message box.

    Stringoptional
    textstyletextstyle

    Custom inline styles for the text within the message box.

    Stringoptional
    smallsmall

    If set to 'yes', a smaller version of the message box is created.

    Stringoptional
    smallimagesmallimage

    An image specifically for the small version of the message box.

    Stringoptional
    smallimagerightsmallimageright

    An image on the right side for the small version of the message box.

    Stringoptional
    smalltextsmalltext

    The text content for the small version of the message box.

    Stringoptional