Squirrelly
Get StartedTemplate SyntaxAPICommunity
7.x.x
7.x.x
  • Overview
  • FAQ
  • Demo
  • Performance
  • Changelog
  • Getting Started
    • Installation
    • Your First Template
    • Why Squirrelly?
    • What's a template engine?
  • Template Syntax
    • The Basics
    • Global References
    • Helper References
    • Filters
    • Helpers
    • Self-Closing Helpers
    • Native Helpers
    • Setting custom tags
    • Partials
    • Built-in Helpers
  • API
    • API Overview
    • Compile
    • Render
    • renderFile
    • load
    • defineFilter
    • setDefaultFilters
    • autoEscaping
    • defineHelper
    • defineNativeHelper
    • definePartial
    • defaultTags
  • Recipes
    • Squirrelly with ExpressJS
  • Guides
    • Generating Badges with Squirrelly
Powered by GitBook
On this page
  • Basic Syntax
  • Examples
  1. Template Syntax

Self-Closing Helpers

Basic Syntax

{{helpername(params)/}}

Examples

{{log("Hi! The index is: " + @index)/}}

The log helper is a native, self-closing helper that's built in to Squirrelly. It turns into a console.log function that logs to the console every time the template is rendered.

The loghelper can be very useful for debugging.

PreviousHelpersNextNative Helpers

Last updated 6 years ago