Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

messageBox element



The "messageBox" element allows to enter a warning or informative message associated with an image.

Attributes

This element has the following attributes:
  • "imageID" (optional): The image id. See image files for the specification of image ids
  • "imageHref" (optional): The relative path of the image, if the image do not refer to an Image definition
  • "type" (optional): the message box type. Can be:
    • "info": for an information message
    • "success": for a "success" message
    • "warning": for a warning message
    • "error": for an error message
    • "progress": for a "in progress" message
    • "default" (the default value): for an undefined message type
  • "caption" (optional): add a caption to the message box
  • "captionPosition" (optional): specify the position of the message box caption. Can be:
    • "inside": to put it inside the box
    • "border": to put it on the message box border
  • "todo" (optional): only useful for "progress" type message boxes, allow to include them in the todolist
  • "color" (optional): the background color of the box, specified in HTML color codes
  • "package": The optional package attribute allows to reference an image in another package
If the type of the message box is different from "default", the image id and the background color will get default values if they are not specified.

You must not have both the "imageID" and the "imageHref" attribute:
  • The "imageID" attribute is for message boxes for which the background image refer to an Image definition
  • The "imageHref" attribute is for message boxes for which the background image point to a relative image file

Using the imageHref attribute

If you specify the "imageHref" attribute, the image points to a relative image file, which must be under a doc-files directory in the same directory as the article which uses the messageBox element.

In that case you must not use the "id" and "package" attributes.


For example, suppose the following file structure:
      wiki
      -- doc-files
      ---- ball.jpg
      -- article.xml
      -- index.xml
And the following content for the article:
   <article desc="My article">
      <messageBox type="info" imageHref="ball.jpg" >
        this an information text
        <br/>
        the second line
      <messageBox>
   </article>
The background of the message box will point to the ball.jpg Jpeg file.

Examples

Info without a caption

    <messageBox type="info">
      this an information text
      <br/>
      the second line
   <messageBox>
Result:
this an information text
the second line

Info with a caption

    <messageBox type="info" caption="the caption">
      this an information text
      <br/>
      the second line
   <messageBox>
Result:
The caption
this an information text
the second line


    <messageBox type="info" caption="the caption" captionPosition="border">
      this an information text
      <br/>
      the second line
   <messageBox>
Result:
The caption
this an information text
the second line

Warning

    <messageBox type="warning">
      this a warning text
      <br/>
      the second line
   <messageBox>
Result:
this a warning text
the second line

Error without a caption

    <messageBox type="error">
      this a a text for an error
      <br/>
      the second line
   <messageBox>
Result:
this a a text for an error
the second line

Error with a caption

    <messageBox type="error" caption="the caption" captionPosition="border">
      this a a text for an error
      <br/>
      the second line
   <messageBox>
Result:
The caption
this a a text for an error
the second line

Progress

    <messageBox type="progress">
      this a in-progress text
      <br/>
      the second line
   <messageBox>
Result:
this a in-progress text
the second line

Progress included in TODOs

Main Article: Todo

In that case the message box will be included in the todolist.
 <messageBox type="progress" todo="this will be in TODOs">
   this a in-progress text
   <br/>
   the second line
<messageBox>
Result:
this a in-progress text
the second line

Custom

    <messageBox color="#00FF00">
      this a custom message box
   <messageBox>
Result:
this a custom message box

See also


Categories: syntax

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.