Elements Language
Template syntax reference for RapidWeaver Elements components
The Elements Language is a lightweight yet powerful templating system built into RapidWeaver Elements. It uses {{…}} syntax for property insertion and provides expressive directives like @if, @each, and @include for dynamic content generation. The language is designed to keep your templates clean, intuitive, and focused on HTML structure.
Property Insertion
Use double curly braces to insert component properties, page data, or collection values directly into your markup:
<h2>{{title}}</h2>
<p>{{description}}</p>
<a href="{{link.href}}">{{link.title}}</a>Access nested properties using dot notation:
<span>{{author.name}}</span>
<img src="{{image.resource.src}}" alt="{{image.alt}}" />Directives Reference
Content Areas
Control Flow
Code Organization
Page Integration
Quick Examples
Editable Text Areas
Dropzones for Child Elements
Conditional Rendering
A template @if accepts a single condition (optionally negated with !). Boolean operators (&&, ||) and comparisons (==, >, etc.) are not allowed and cause a lexer error. See Combining Conditions for the supported alternatives.
Looping Over Collections
Including Templates
Portals for Script Injection
Inline Templates
Anchor Points
Raw Output for CMS Integration
Best Practices
Keep templates focused on HTML - Use the hooks file for complex logic, string manipulation, and data processing.
Use meaningful property names - Choose descriptive names that indicate purpose:
showHeader,buttonLabel,heroImage.Extract repeated patterns - Use
@includeor@templatefor reusable markup.Leverage conditionals for modes - Use
editandpreviewvariables to show appropriate content in each mode.Organize portal content - Use
includeOnceand consistentidvalues to prevent duplicate script/style injection.
Last updated
Was this helpful?

