Free-Conversant Support / renderMsg macro
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Macros >> renderMsg macro

Macro: renderMsg

Usage:

<!--#renderMsg msgNum="1" template="message template"-->

Overview:

Renders the message with the specified template.

Very useful when you want more than just one or two fields from a message and the msgNum isn't already in context.

Example

For example: you could create a special "message viewing" page which displays the message specified as a search-arg (query arg) in the URL, like www.example.com/showMsg?id=1

Then, somewhere on the page, you would put
<!--#renderMsg msgNum=<!--#request.oneSearchArg argName="id"--> template="my message template"-->

Experienced Conversant users: note that this puts your new msgNum into "context" for just long enough to render your message through the specified template. When it's done, the old message (if there was one) comes back again. So, technically, you could render one message right in the middle of another.

Attributes:

  • msgNum="[number/special value]" : Used to override the context's default message number. Values can be the number of a message, or relative to the context's message. Acceptable relative values are: "next" (next valid message), "prev" (previous valid message), "nextThread" (top of next thread), "prevThread" (top of previous thread), "top" (first message in current thread), "inresponseto" (the message the current message is a reply to).
  • template="[template name]": the name of a template in your conversation
View in DG