HaXtatic Docs

hax.noOp

Outputs either the given content exactly-as-specified, or ignores it and outputs the pre-configured "constant" content.

In a nutshell

  1. Declaration of an |X|hax.noOp:myTag or |X|hax.noOp:myTag:constant-content-here directive in a *.haxproj file,
    • further configuring: (no other settings)
  2. Usage anywhere: {X|myTag: any content to output or discard here |}

This topic is in a compact format for users already familiar with the essentials of declaring X-tags and invoking them. If found challenging, try the more-elaborate-and-introductory topics first to form a better grasp on the basics and overall mechanisms.

Stage:

Early — this X-renderer does not require a page context for rendering: therefore many hax.noOp-invoking X-tags encountered during pre-templating (at start-up time) may be eagerly processed immediately in-place (for overall-reduced per-page processing loads).

Purpose

The same as that of the very common id and const functions in idiomatic pure functional programming.

  
…Scroll to: