Free-Conversant Support / Conditional Macro: ioInterface
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Conditionals >> general >> ioInterface

Conditional Macro: ioInterface

Operators:

  • == (equal to)
  • != (not equal to)

Usage Notes

  • Tests the method being used to render/view the page, and compares it with the |conditional value| on the right of the |conditional operator|.
  • The |conditional value| that is compared with it must be the name of one of Conversant's IO methods. Currently, only these two values will ever compare successfully:
    • mainResponder - true when the page is being viewed in a browser
    • email - true when then page is being rendered and sent out for email

Examples

This example would show line 1 in email, line 2 in the browser, and line 3 via any other (eventually supported) output method.

<!--#if condition="ioInterface=='email'"-->

You will only see this line in email.

<!--#elseif condition="ioInterface=='mainResponder'"-->

This line would only display in actual web pages.

<!--#else-->

This text would be displayed if the page were being viewed through another output method, such as XML-RPC or News/NNTP, if the method supports macros (currently only email and web support macros).

<!--#endIf-->

See the above code in action, here:

This line would only display in actual web pages.
View in DG