Command @(...) inline expression Foundation

Defines an inline expression with implicit output to the current section

Syntax
@(<expression>)
Description

The @(<expression>) syntax allows embedding expressions directly inside your declarative HTML markup in a simple and distinct way. The following sample code shows some usage patterns and how the expression is transformed by the CxcBuilder to output the expression result in the current section.

Markup: 
<h1>@(FIELD->TITLE)</h1> 
Code: 
::HttpResponse:WriteStr("<h1>",FIELD->TITLE,"</h1>") 

Markup: 
<p>Today is @(Date())!</p> 
Code: 
::HttpResponse:WriteStr("<p>Today is ",Date(),"!</p>") 

Note that the output is automatically HTML-encoded! Therefore, inline expressions cannot be used to write raw data to the output section.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.