Hi
My use case is as follows: I want to intercept all usage of the "input" tag in ADPs, and in the case where it is of type "hidden", I want to do some further processing. Otherwise, display it is as normal.
I thought to use template_tag to do this, but I must confess that I'm struggling a little. In my tags-init.tcl, I have defined my tag:
template_tag input { params } {
aims_template_tag_input $params
}
Then in tags-procs.tcl I define the aims_template_tag_input proc.
I don't fully understand the context that I am now in. Changes to the files aren't always being picked up even when file is watched (seems to be some sort of caching of ADPs going on, but it's not consistent).
Below is the outline of what I'm trying to achieve. How can I display the input tag as defined in the ADP, in the case where it is not "type =hidden"?
ad_proc -public aims_template_tag_input { params } {
} {
set type [template::get_attribute input $params type]
if { $type ne "hidden" } {
#here I want to display the input tag as normal
} else {
#do further processing
}
}
Any other advice about working with these tags? I have seen some very old threads describing this as a "dark art", and also stuff like "if you touch the source .adp it will recompile it again", but I can't get this to behave consistently.
many thanks for any pointers
Brian