Index: openacs-4/etc/install/tcl/twt-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/tcl/twt-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/etc/install/tcl/twt-procs.tcl 23 Oct 2003 12:35:01 -0000 1.7 +++ openacs-4/etc/install/tcl/twt-procs.tcl 23 Oct 2003 13:49:22 -0000 1.8 @@ -233,3 +233,17 @@ ::tclwebtest::field_select -index $index } + +ad_proc ::twt::count_links { pattern } { + + set count 0 + foreach link_list [link all] { + array set link $link_list + + if { [regexp $pattern $link(url)] } { + incr count + } + } + + return $count +}