HZML

The living, breathing, squirming guts of Hazel is her "HZML." That stands for "Hazel's Markup Language", and it is simply a way for you to give Hazel instructions within your HTML pages, describing what data you want from her and how you with it to be displayed.

Hazel's actions are more general and explicit way of telling Hazel what to do, not quite HZML, but we include them here, sort of as hyperlinks are to HTML. (And all communication with Hazel is done through her actions, which are simply hyperlinks or forms containing structured data Hazel understands.)

Back to HZML. HZML can be divided into two types: tokens and tags.

Tokens are simply words (eg. %HZE_BILL_FNAME representing some data Hazel knows, either through her configuration, her products file, or data entered by the shopper. When you ask Hazel to serve a page, or when she serves her checkout actions, she scans the HTML for these tokens, and replacing them with the corresponding data. Think of HZML tokens as "variables" or "macros".

You can think of HZML tokens as Hazel's version of "variables" or "macros" in other languages.

HZML tags (or "elements") are akin to HTML tags. They either indicate a certain action or rendering to be performed, or wrap around a body of other tags and tokens to be interpreted. The first HZML tag was the Hazel-Loop, which allowed us to give merchants a flexiblle way to display all the items in a shopper's cart.

HZML loops have since been greatly extended to allow looping over all sorts of data, restricting how many loops you perform, knowing what iteration of a loop you're in, looping over a random set of data, and much more.

HZML Loops are much like "for" and "while" structures in other languages.

With HZML and Hazel, you can do just about anything you can with other web-based languages, such as PHP and Perl. While not as complete as those true programming languages, HZML is arguably more flexible and easier to learn for those used to coding traditional HTML pages.


Getting Started HZML Rules Extras Advanced Reference
Walkthrough
Configuration
Products File
Order Reporting
Platforms
Upgrading
Known Problems
Actions
HZML Tokens
HZML Tags
HZML Loops
HZML & HAM
Overview
Shipping
Sales Tax
Discounts
Surcharges
Tweaking
Customization
Input Fields
Softgoods
Search Engine
Optioned Products
Plugins
Design Tips
Themes
Currency
Payment Methods
Coupons
Regular Expressions
Perl API
hazel.config
Templates
HTML Basics
CGI and You
ChangeLog

Hazel Home - Help Contents - Searchable Knowledge Base - Live Technical Support