We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Codev Web>SearchAllWebsSelectors (31 May 2001, SteveRoe)
Tags:
create new tag
, view all tags
Moved from SearchAllTWikiWebs
A simple and powerful, but somewhat technical solution is to introduce a new variable in TWikiPreferences, lets say %WIKIWEBSELECTOR% , that contains the <select>...<select> list box with all webs that should be visible. Here is an example (The form is added for demonstration only, the actual variable would only define the <select>...<select> part) :

This form could be used on the view template to jump to a web (instead of the { Main | Codev ... } list. (The current view script needs to be extended to understand a "web=" parameter)

TWiki could implicitely create yet another variable %WIKIWEBSEARCHSELECTOR% , it is the %WIKIWEBSELECTOR% variable with a <option value="*" >(all webs)</option> added after <select> . The current web would be selected. This selector would be the optional selector for the search form:

The downside of this design is that the user needs to define the webs twice in TWikiPreferences. This would be OK with me. Opinions?

-- PeterThoeny -- Apr 2000

part one We seem to be proliferating webs here at DrKW - it seems that everyone who has a project wants their own web. Short of going to hierarchical webs this variable is invaluable as the number of WebSearch templates proliferates. Did anyone do this yet? If not I'll do it tomorrow and input to CVS via JohnTalintyre.

part two Have now found the getAllWebs function in Store.pm - will add a wikivar to handleCommonTags in TWiki.pm - %WIKIWEBSEARCHSELECTOR% that gets the list and renders in drop box HTML as described above unless anyone objects. We could put into DefaultPlugin? .pm - but it seems like this would be useful in the TWiki core.

part three It seems that just rendering

<option>...</option>

is most flexible. This allows the template to have any name for the selection and any other components such as the (all webs) option.

-- SteveRoe - 30 May 2001

TopicClassification:
FeatureEnhancementRequest
Topic revision: r3 - 31 May 2001 - 07:45:43 - SteveRoe
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback