Free-Conversant Support / Message Conditional Macro: msg.creator.address.length
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Conditionals >> Messages >> Creator >> address >> msg.creator.address.length

Message Conditional Macro: msg.creator.address.length

Operators:

  • == (equal to)
  • != (not equal to)
  • greaterThan
  • greaterThanOrEqualTo
  • lessThan
  • lessThanOrEqualTo

Usage Notes

  • Tests the length of the body text of the current message, comparing it with the |conditional value| on the right side of the |conditional operator|.

  • This is an extremely simple conditional, and is intended for use in places where the length of a message determines whether or not something is displayed. For example, if a message is less than 500 characters long you might want to display the whole thing, but if it's longer you'd prefer to cut the message short and include a link to the full message on another page. (You might want to build such a feature into your weblog item template, after the weblog tool has been updated to support conditional macros.)

Examples

In this example, the second line will be used because this message is more than 350 characters long.

<!--#if condition="msg.creator.address.length <= '50'"-->

1. <!--#msgCreator-->

<!--#else-->

2. (Email Address too long.)

<!--#endIf-->

See the above code in action, here:

1. <!--#msgCreator-->

Note that you'd actually use this macro in a template, not in a message, so that it would affect any messages "rendered" through that template.

View in DG