corner black line corner
black line
the Hazel Logo Hazel Enterprise: The Internet Merchandising System The Netsville Logo
start red bar Home News Info Features Examples Purchase Support Contact Us end red bar
Documentation: HZML in the HAM

Why does HAM taste so good? It's the HZML.

These HZML tags are available only within the latest compiled binary versions of HAM (version 4+), usable in her HAM templates (hazel-cat/HAM/templates) to customize your administration interface.

<Hazel-HAM-Cando />
Query a security capability of the current user. HAM only; v4.000+
Class

A security class is something such as "products:rwad" where "products" can be any generic HAM action type (eg. "config", "orders", "products", "users") , and "rwad" represents a set of read, write, add, and delete operations.

Result Name in %HZV root to store result. Default value: "RESULT"

If the current user is able to carry out an action of the given security class, set result true. The result can then be checked in (eg.) a Hazel-True block to conditionally display options within the HAM.

<Hazel-HAM-Cando Class="users:w" Result="WUSER" /> <Hazel-True Token="%HZV_WUSER"> <a href="%HZU_HAM?action=list_users">Edit Users</a> </Hazel-True>
<Hazel-HAM-Loop Type="Orders"> ... </Hazel-HAM-Loop>
Render a block of HZML for each order received. HAM only; v4.000+

As other Hazel loops, the orders loop renders its content once each for a certain number of items. In this case, those items are orders received by Hazel.

Within an orders loop, you can use the HAM-specific %HZO token namespace to access any of the fields in your orders files. Additionally, there are some custom tokens available:

  • %HZO_HAM_DELETED is true if the order has been marked for deletion.
  • %HZO_HAM_LAST_EXPORTED is true if the order has been successfully exported.

Within each loop, %HZH_HAM_ORDERS_LOOP_COUNT counts up the sequence. When the loop is finished, %HZH_HAM_ORDERS_LOOP_TOTAL holds the total number of loops.

A simple example of an orders loop follows, but the full experience can be had by inspecting the hazel-cat/HAM/templates/list_orders.html template in your HAM distribution.

<ul> <Hazel-HAM-Loop Type="Orders"> <li>%HZO_ORDER_ID placed %HZO_DATE by %HZO_BILL_FNAME %HZO_BILL_LNAME in the amount of $%HZO_TOTAL_ORDER.</li> </Hazel-HAM-Loop> </ul>
<Hazel-HAM-Loop Type="Users"> ... </Hazel-HAM-Loop>
Render a block of HZML for each HAM user defined. HAM only; v4.000+

The users loop renders its content once for each user you have defined in the HAM system.

Within a users loop, you can use the following tokens:

  • %HZH_WORD1 is the user's userid.
  • %HZH_WORD2 is the user's name.
  • %HZH_WORD3 is the user's hashed password.
  • %HZH_WORD4 is true if the user is pending deletion.

Within each loop, %HZH_HAM_USERS_LOOP_COUNT counts up the sequence. When the loop is finished, %HZH_HAM_USERS_LOOP_TOTAL holds the total number of loops.

For a detailed example, see the hazel-cat/HAM/templates/list_users.html template in your HAM distribution.

<ul> <Hazel-HAM-Loop Type="Users"> <li>%HZH_WORD2 (%HZH_WORD1) is <Hazel-Choice Token="%HZH_WORD4" False="NOT" /> awaiting deletion.</li> </Hazel-HAM-Loop> </ul>
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

black line
corner black line corner