Elements Language
Component Template Folder
The Elements Language (also known as the Elements API) is a lightweight yet powerful templating system built into RapidWeaver Elements. It uses {{…}} syntax for property insertion and offers expressive control structures like @if, all aimed at keeping your templates clean, intuitive, and logic-driven.
Property Insertion with {{…}}
Use the familiar {{…}} syntax to inject component or page data directly into your markup. It’s simple and intuitive. Values from properties or collections appear where needed:
<h2>{{title}}</h2>A container you can drop other components into.
@dropzone("extraItems")Editable text areas.
@text("heading")Editable styled text area.
@richtext("heading", default: "Hello World!")Control block-level rendering with clear, condition-based syntax. Elements Language uses @if, @elseif, @else, and @endif choosing when to display content based on properties.
@if(condition)
  …
@elseif(otherCondition)
  …
@else
  …
@endifIterate over a number of items, repeating content.
@each(item in items)
  <li>{{item.title}}</li>
@endeachInclude the content from another template file.
@include("button")Transport content to another area of the page.
@portal(pageStart)
<!-- Code here will be transported to the top of the page before the open HTML tag.-->
@endportalDefine inline pieces of markup for reuse
@template("button")
  <button>{{label}}</button>
@endtemplateThen include them
@include("button", label: "Buy Now")Instruct Elements to add a linkable anchor in Elements Link Panel.
<div id="@anchor("myAnchor")"></div>Disables template processing.
@raw()
    ‹div class="text-sm text-black-600">{{message}}</div>
@endrawLast updated
Was this helpful?

