Documentation
This function is used in the tag editor's autocompletion textboxlist to return
a set of matching tags given the prefix in the url param
q
. See the
classificationplugin.tmpl
template
file.
Parameters
- TAG: pattern of tags to include, defaults to a neutral filter; this pattern is to match the prefix of the tag name
- LIMIT: maximum number of categories to return, defaults to 10
- THEWEB: web from which to extract category information, defaults to BASEWEB
Implementation
%STARTINCLUDE%%DBSTATS{
"TopicType=~'\b(TaggedTopic|ClassifiedTopic)\b'"
%IF{"defined TAG" then="include=\"^%TAG%\""}%
field="Tag"
web="%THEWEB{default="%BASEWEB%"}%"
header="[$n"
format="{\"value\":\"$key\"}"
separator=",$n"
footer="$n]"
limit="%LIMIT{default="10"}%"
pattern="^(.*)$"
}%%STOPINCLUDE%
Test
[
{"value":"BarBaz"},
{"value":"FooBar"},
{"value":"a a a"},
{"value":"bar"},
{"value":"fertig"},
{"value":"festival"},
{"value":"foo"},
{"value":"freak"},
{"value":"test"},
{"value":"topic"}
]