Skills Plugin Advanced Search

You can create a more advanced search by defining the form manually. This allows you to use an extra input field, called topicsearch. The topicsearch field searches the contents of the topic (inluding meta data) and requires this to match as well as the skill search. This can be used to search for a particular office location/country, such as CambridgeOffice or Germany. Obviously its not perfect, someone may have just referenced Germany in their topic and it may not be their location, but it can still be useful.

Below is how an advanced skill search might look with a topic search text box. View the source code of the page to see how it is made (starts at <!-- ADVANCED_SKILL_SEARCH -->).

Search Skills
Category Skill
Rating Between       and   
Topic Search

%SKILLSSEARCHRESULTS%

You must also remember to put the %SKILLSSEARCHRESULTS% tag somewhere in your topic. This is where the search results will be displayed, and also imports the javascript for the form to work correctly.

You can also create a drop down menu in place of the topic search text box. This could hold values such as locations or countries. You can either create this manually or use a FormattedSearch. For example, if each of your office locations has their own topic which end in the word Office (CambridgeOffice, BangaloreOffice, ...), the following code will create a drop down menu populated with all the offices:

<select name="topicsearch">
%SEARCH{".*Office$" type="regex" scope="topic" nonoise="on" web="%MAINWEB%" format="<option value=\"$topic\">$topic</option>"}%
</select>

TWiki searches are very powerful, so you could get your data from almost anywhere. See VarSEARCH for more information on searching.


This topic: TWiki > SkillsPlugin > SkillsAdvancedSearch
Topic revision: r2 - 02 Oct 2012 - TWikiAdminUser
 
This site is powered by the TWiki collaboration platformCopyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SkillsAdvancedSearch.