Search field in the page content (TagSearch)

< Manual:Extension
Revision as of 16:36, 28 July 2020 by Mlink-rodrigue (talk | contribs) (Changed categories.)


TagSearch allows the integration of a configurable search field in content pages. This search field relies on BlueSpiceExtendedSearch.

Inserting the tag

The tag <bs:tagsearch /> can be inserted and configured directly in visual editing mode.

Go to Insert > Magic word in the VisualEditor menu. Select tagsearch from the dialog and click done. This opens the configuration options dialog on the page.

Inserting TagSearch on a page
Inserting TagSearch on a page
Parameter Display name Description
placeholder Placeholder Text to be shown in the search field when nothing is typed in
type Type List of types of search entities to search. By default search entities availble are: wikipage, specialpages, repofile (internal files), externalfile, socialentity. Multiple values can be entered separated by pipe (|) - "wikipage|repofile"
ns Namespace(s) List of namespaces in which to search. Namespaces can be entered by using their IDs or names, separated by a pipe (|). IDs and names cannot be mixed. Correct entries are: "1|6|8", "Help|QM", while invalid is "1|QM".

To search in the main namespace, use an empty space as value (e.g., " " or " |Template")

cat Category(-ies) List of categories in which to search. Mutltiple categories must be separated by a pipe (|) - "Cat1|Cat2"
operator Search operator Applies only to categories. Operator "AND" will only find results that are in all of the given categories, while operator "OR" will show results in any of the given categories.


Multiple tags can be added to a single page using the same or different configurations.

Using the search field

Once the page is saved, the code for the search field is inserted in the page source where it was inserted.

Example:

<bs:tagsearch type="wikipage" operator="AND" ns=" |Template" category="Editing" />

The search is looking for wiki pages in the namespaces (Main) and Template that belong to the category Editing.

Clicking on search icon to the left or pressing Return loads the full-text search in the Search-Center.

Search field on the page
Search field on the page


Related info

Attachments

Discussions