Tags:
create new tag
, view all tags

Question

Howto search metadata from within a plugin, is there any docs, examples or can someone give a hint. Using same syntax as in %SEARCH{ ... type="query" ......}

I wish to create a simple plugin that takes parameters (this is no problem) and then searches all topics with forms and formfields with the values from the parameters.

I will use this for special purposes so a WebSearch or search in a topic is not the solution.

I see a TWikiFuncDotPm search_InWebContent_searchString but since we can search very elegantly now in the topics with type="query" etc then I want to do similar in a plugin also.

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian
Web server: Apache 2.2
Perl version: 5.8
Client OS: Ubuntu, XP
Web Browser: IE, FF
Categories: Forms, Search, Plugins

-- LarsEik - 03 Mar 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

You can use TWiki::Func::searchInWebContent().

Alternatively, do a VarSEARCH with all the parameters available:

my $text = TWiki::Func::expandCommonVariables( '%SEARCH{ "foo" type="query" ... }', $basetopic, $baseweb );

-- PeterThoeny - 03 Mar 2008

 
Change status to:
Topic revision: r2 - 2008-03-03 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.