boxlang-templating

Generate dynamic HTML views using BoxLang expressions in .bxm templates.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-templating-ortus-boxlang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: boxlang-templating
Source: https://github.com/ortus-boxlang/skills/tree/main/boxlang-developer/templating
Command: npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-templating-ortus-boxlang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang templating enables developers to generate HTML views by mixing HTML with BoxLang expressions using .bxm templates, providing a clear separation of presentation and logic and reducing boilerplate in view rendering.

Core Features & Use Cases

  • Inline expressions with #...# inside bx:output blocks to render dynamic content.
  • Rich template components like bx:output, bx:loop, bx:include, bx:script, and bx:set to control flow and data.
  • Use cases include building reusable layouts, composing views from partials, and templating pages that integrate server-side data with HTML.

Quick Start

Start by creating a .bxm template that renders a list of products using a bx:loop and bx:output.

Frequently Asked Questions about boxlang-templating

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate dynamic HTML views with BoxLang?▼

You can render dynamic content in .bxm templates by wrapping BoxLang expressions in #...# syntax inside <bx:output> blocks. This evaluates and outputs server-side data directly within your HTML markup, ensuring proper data binding for view rendering.

Can I use loops and conditionals in .bxm templates?▼

Yes, you can control flow and iterate over data in .bxm templates using the <bx:loop> component. This allows you to build dynamic pages that render lists and collections by repeating HTML blocks for each item in your server-side data.

What is the best way to structure reusable layouts and partials?▼

The best way to structure reusable layouts and partials in BoxLang templating is by using the <bx:include> component. This allows you to compose larger views from smaller, reusable template files, significantly reducing boilerplate in view rendering across your application.

Does BoxLang provide HTML output encoding for dynamic templates?▼

Yes, BoxLang templating provides HTML output encoding guidance to ensure dynamic content is safely rendered. When using <bx:output> blocks to display server-side data, the encoding mechanism helps prevent security vulnerabilities by properly escaping HTML characters.

How do I set variables directly within a template file?▼

You can set variables directly within a .bxm template file using the <bx:set> component. This allows you to define and manipulate data inside the template scope, providing flexible data management before rendering the HTML output.