boxlang-templating

Render dynamic HTML from .bxm templates using BoxLang expressions.

16|78|Updated Nov 28, 2014
One-click install
npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-templating
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-templating
Source: https://github.com/ortus-docs/coldbox-docs/tree/main/.agents/skills/boxlang-templating
Command: npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-templating

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang templating enables developers to mix HTML with dynamic BoxLang expressions in .bxm files, simplifying the creation of reusable views and templates.

Core Features & Use Cases

  • Template components: render dynamic content with bx:output, include partials with bx:include, and drive templates with bx:loop and bx:set.
  • Hybrid syntax: mix script and tag syntax in the same template for flexible logic and presentation.
  • Layout patterns: compose layouts with nested includes and reusable components for consistent UI.

Quick Start

Create a new .bxm template that renders dynamic HTML by using bx:output, bx:loop, and bx:include.

Frequently Asked Questions about boxlang-templating

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

FAQPage Schema
How do I create dynamic HTML with BoxLang templates?

You create dynamic HTML by writing .bxm template files that mix standard HTML markup with BoxLang expressions. Use core components like <bx:output> to render variables and <bx:loop> to iterate over data directly within your views.

What is the best way to build reusable web layouts in BoxLang?

Build reusable layouts by using <bx:include> to insert partial templates into your main views. This allows you to compose nested components and maintain consistent UI structures across all web pages in your application.

Can I mix script and tag syntax in the same .bxm template file?

Yes, BoxLang templates support a hybrid syntax that lets you mix script and tag syntax in the same file. This provides flexible logic handling and presentation formatting within a single dynamic content view.

Do I need the BoxLang runtime to render .bxm templates?

Yes, rendering .bxm templates requires BoxLang runtime support. The runtime processes the dynamic expressions, executes tags like <bx:loop> and <bx:set>, and outputs the final HTML for web UI development.

How do I loop through data to generate dynamic content in BoxLang?

Use the <bx:loop> component to iterate over data structures and generate dynamic content. Combined with <bx:output> for variable rendering, this drives repeated HTML structures like lists or tables in your templates.