HTP

htp on-line reference : BLOCKDEF, /BLOCKDEF

Table of Contents
  Introduction
  License
  Tutorial
  Usage
  HTP Tags
    ALTTEXT
    BLOCK
  > BLOCKDEF
    DEF
    FILE
    IF
    INC
    IMG
    IMAGEURL
    OPT
    OUTPUT
    QUOTE
    SET
    UNDEF
    UNSET
    USE, $
    WHILE
    <!---
  History
  Wish list
  Bugs

syntax

  <[ref]set time="0">
  <[ref]block name=a>
    a is expanded at time <[ref]use time>.
  <[ref]/block>
  <[ref]block name=b expand>
    b is expanded at time <[ref]use time>.
  <[ref]/block>
  <[ref]set time="1">
  <[ref]use a>
  <[ref]use b>
  contents of a: <[ref]use a noexpand>
  contents of b: <[ref]use b noexpand>
  <[ref]block name=c expand>
    c is expanded at time <[ref]use time>; <[ref]use a>
  <[ref]/block>
  <[ref]block name=d expand>
    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
  <[ref]/block>
  <[ref]block name=e>
    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
  <[ref]/block>
  <[ref]set time="2">
  <[ref]block name=a>
    a is defined for the 2nd time <[ref]use time>.
  <[ref]/block>
  <[ref]use c>
  <[ref]use d>
  <[ref]use e>

synopsis

BLOCKDEF creates block metatags, which is a fancy way of saying it creates new block tags. A block tag is a tag that takes a whole block as additional parameter. This block is surrounded by <tagname> and </tagname>. The contents of this block are automatically stored in the block macro named BLOCK.

For example:

    <[ref]def name="centered">
    <p align=center>
    <[ref]/def>

    <centered>
    This text is centered.

All block metatags have the implicit option EXPAND, which tells htp to expand the contents of the block before the definition is expanded.

A more thorough discussion and more elaborate examples are discussed in the metatag section.

  page source
  htp project
  htp homepage
hosted by
Sourceforge
HTML coding Powered by htp
htp on-line reference / http://htp.sourceforge.net/ref/
Authors: Jim Nelson, Jochen Hoenicke, Michael Möller.
Maintainers: Jochen Hoenicke.

Copyright © 1995–96 Jim Nelson.
Copyright © 2001–2014 Jochen Hoenicke.
Permission to reproduce and distribute this hypertext document granted according to terms described in the License section.

last updated Sat May 16, 2015