Forum OpenACS Q&A: Proc call inside ADP tag?

Collapse
Posted by Ola Hansson on
Hi folks!

Is it possible to call a proc from inside a self-made tag? (I.e.,
defined in photonet-styles.tcl). Writing <bodynote>My service is
called <%=[ad_system_name]%></bodynote> e.g.,
results in:

'My service is called <%=[ad_system_name]%>'

Thanks, Ola

Collapse
Posted by Ben Adida on
The way to do this is to make sure that your self-made tag is
implemented with ns_register_adptag, and you call
ns_adpparse on the string contained in the tag. You have to do
this explicitly in the proc you register for your ADP tag. You will
need the fancy ADP parser for this (follow AOLserver.com
instructions for this).
Collapse
Posted by Ola Hansson on
Or you could write like this in the .adp page (at least I did):
<%
set text "Welcome to [ad_system_name]!"
%>

<%=[ad_style_bodynote $text]%>