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="%IF{"defined THEWEB" then="%THEWEB%" else="%BASEWEB%"}%"
  header="[$n"
  format="{\"value\":\"$key\"}"
  separator=",$n"
  footer="$n]"
  limit="%IF{"defined LIMIT" then="%LIMIT%" else="10"}%"
  pattern="^(.*)$" 
}%%STOPINCLUDE%

Test

[
{"value":"Application Performance Management XML Oracle Database"},
{"value":"BarBaz"},
{"value":"FooBar"},
{"value":"a AA"},
{"value":"a a a"},
{"value":"a aa"},
{"value":"fertig"},
{"value":"festival"},
{"value":"freak"},
{"value":"test"}
]

Copyright

© 2006-2013 Michael Daum http://michaeldaumconsulting.com

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Topic revision: r1 - 07 Jan 2013, ProjectContributor
Warning: Can't find topic Applications/ClassificationApp.WebLeftBarExample

 

Das Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.