htp on-line reference : Macros

table of contents
  Introduction
  Usage
  Files
  Concepts
   Macros
   Metatags
   GLOBAL and EXPAND
  HTP Tags
  History
  Wish list
  Bugs

Macros are definitions that can later be expanded anywhere in the HTML document. They are defined with the SET and BLOCK tags and undefined with the UNSET tag. Please read these sections for a more technical explanation of the definition syntax.

There are two ways to expand macros. The USE tag can be used anywhere in the normal text. It will be replaced by the content of the macro. The other way is the '$' operator which only works inside macros. You can even use '$' inside another '$' operator or inside a use operator in case the macro name is stored in another macro.

Note that '$' unlike the USE tag doesn't work with block macros.

predefined macros

There are a few predefined macros:
_htpfile_in
The main htp file that is being processed.
_htpfile_out
The name of the html file that is created.

Also every environment variable is implicitly defined as macro.

htp project

htp homepage

hosted by
SourceForge.net Logo

htp on-line reference / http://htp.sourceforge.net/ref/
Authors: Jim Nelson, Jochen Hoenicke, Michael Möller.
Maintainers: Jochen Hoenicke, Michael Möller.

Copyright © 1995-96 Jim Nelson.
Copyright © 2001-2002 Jochen Hoenicke, Michael Möller.
Permission to reproduce and distribute this hypertext document granted according to terms described in the Introduction

last updated Mon May 27, 2002