[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_adp_registertag

Overview

Register an ADP tag

Syntax

ns_adp_registertag tag ?endtag? adpstring

Description

ns_register_adptag registers a procedure to be called when the specified beginning and ending tags are used in an ADP. The tag is the beginning tag to look for, and the endtag is the ending tag to look for. The adpstring is an ADP that will be called when AOLserver encounters the specified tags when processing an ADP.

There are two ways to use ns_register_adptag, with and without the endtag parameter:

The string is not parsed, which means that you cannot include ADP tags in the string unless you execute ns_adp_parse on the string inside the ADP that processes the registered ADP tag.

Note: This function is best used in a .tcl file rather than an .adp file, because the parser will be confused by the <% ... %> syntax even though they are in braces.

Example

    ns_adp_registertag printdate {
    	The current date is:
    	<%
    		ns_adp_puts [ns_httptime [ns_time]]
    	%>
    }

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.