WebStencils Syntax

WebStencils uses a simple syntax based on two main elements:

  1. The @symbol
  2. Curly braces for blocks { }

The @Symbol

The @symbol is used as a special marker in WebStencils. It can be followed by:

@object.value

This syntax accesses the 'value' property of 'object'. The object name is a symbolic local name that can match an actual server application object or be resolved in code while processing an OnValue event handler.

Curly Braces for Blocks { }

Curly braces are used to denote conditional or repeated blocks. They are processed only when used after a specific WebStencils conditional statement.

Accessing Values with the Dot Notation

Here's an example of how values are accessed in WebStencils:

<h2>User Profile</h2>
<p>Name: @user.name</p>
<p>Email: @user.email</p>