Location Search Macro
Wiki macro using a reference given as parameter to trigger search with the location pre-filled |
Type | XAR |
Category | Other |
Developed by | |
Active Installs | 1 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Easily search:
- specific kinds of elements (documents, comments, attachments, …)
- in specific locations
- with specific tags
- with specific object types
To use the macro, you can use the following syntax when in wiki edition mode:
With the following result:
Here's how the suggestions look:
Full parameter list:
Narameter name | Description | Example | Mandatory | Default value |
---|---|---|---|---|
reference | Restrict search to this location. Takes a document reference | MySpace.WebHome | No | WebHome (since version 1.4; searches in the current document sub tree by default, use the empty string to search everywhere) |
box | Display the search field in a box | true | No | false |
float | Make the search field float | true | No | false |
placeholder | Customize the placeholder displayed in the search input | Search… | No | the translated "panels.search.inputText" string |
buttonText | Customize the text of the search button | No | the traslated "search" string | |
width | The size of the search box, in CSS | 100% | false | (empty) |
inputWidth | The size of the input, in CSS | 15em | false | (empty) |
buttonWidth | The size of the button, in CSS | 5em | false | (empty) |
description | a description that will be shown to explain what the search field does | Search this space for documents with the meeting and notes label | No | (empty) |
tags | Restrict search to this comma-separated list of tags | meetings,notes | No | (empty) |
className | Restrict search to documents containing objects of this type | Blog.BlogPostClass | No | (empty) |
kind | Search in the specified kind of element, among "title", "content", "comment", "attachmentName", "attachmentContent", "attachment" (which is a shorthand for the two previous options), "object", "all". Note: this is different from the "type" field in Solr, hence the different name. The Solr type is always DOCUMENT, in order to be able to apply the different search restrictions specified using the relevant parameters. | attachment | No | all |
suggest | Whether to suggest results while typing a search string. | false | No | true |
showExcerpts | Whether to show excerpts in which matches are highlighted with suggested result. Only relevant if suggest is not set to false. | false | No | true |
Release Notes
1.4.6
1.4.5
The following translations have been updated with this release:
1.4.4
1.4.3
Fix French translations.
1.4.2
Fix English strings.
1.4.1
1.4
1.3
1.2
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki