Using SearchPlugin
The SearchPlugin embeds search results directly in pages.
Description
Use this plugin to display search results within page content. You can search by text query, filter by category, keywords, author, or editor, and choose various output formats. Great for creating dynamic index pages, dashboards, and personal contribution summaries. See Plugins for a complete list of available plugins.
Syntax
[{Search query='keyword'}] renders as:
Found 27 results for "keyword"
| Page | Score |
|---|---|
| User Keywords system | 66.139 |
| System Keywords documentation | 65.982 |
| Keywords and Categories documentation | 59.110 |
| ConfigAccessorPlugin documentation | 56.212 |
| Page Metadata Documentation documentation | 4.921 |
| Search Documentation documentation | 4.867 |
| Media Management documentation | 4.762 |
| Media documentation | 4.739 |
| ValidationManager documentation | 4.574 |
| Frontmatter documentation | 4.525 |
| Share Links documentation | 4.513 |
| Private Pages documentation | 4.458 |
| Using SearchPlugin documentation | 4.442 |
| Plugin Parameter Shortcuts documentation | 4.426 |
| Page Status documentation | 4.352 |
| Using MediaPlugin documentation | 4.345 |
| Private system | 4.336 |
| Contextual Variables documentation | 4.198 |
| User Documentation system | 4.160 |
| Configuration Properties Reference documentation | 3.851 |
| Page Storage Guide documentation | 3.701 |
| Page Private documentation | 3.549 |
| Why Use This Platform documentation | 3.319 |
| Page Audience documentation | 2.783 |
| Editing a Page documentation | 2.610 |
| Using Captures documentation | 2.570 |
| Using MarqueePlugin documentation | 2.420 |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | * | Search text (* for all pages) |
system-category | string | — | Filter by system category |
user-keywords | string | — | Filter by keywords (pipe-separated OR logic). 'current' self-scopes to this page — see Plugin Parameter Shortcuts |
author | string | — | Filter by page author (original creator). Use $currentUser for the logged-in user — see Plugin Parameter Shortcuts |
editor | string | — | Filter by last editor. Use $currentUser for the logged-in user — see Plugin Parameter Shortcuts |
max | number | 50 | Maximum results (0 = unlimited) |
pageSize | number | 0 | Results per page — enables pagination (0 = disabled) |
page | number | 1 | Current page number (also read from ?page= query string) |
format | string | table | Output format: table, count, titles, list |
Output Formats
| Format | Description |
|---|---|
table | Full table with page names and scores (default) |
count | Just the number of results (inline-friendly) |
titles | Bullet list with links |
list | Simple list of page names without links |
Examples
Basic Text Search
[{Search query='plugin' max=10}] renders as:
Found 10 results for "plugin"
| Page | Score |
|---|---|
| Plugin Guide general | 93.390 |
| Plugin documentation | 65.635 |
| Plugin Parameter Shortcuts documentation | 54.441 |
| Using Current Time Plugin documentation | 49.331 |
| Using SearchPlugin documentation | 31.831 |
| Geology Demo general | 31.768 |
| Using TotalPagesPlugin documentation | 31.748 |
| Using IndexPlugin documentation | 31.715 |
| Using UptimePlugin documentation | 31.714 |
| Using ReferringPagesPlugin documentation | 31.696 |
All Pages in a Category
[{Search system-category='documentation' max=5}] renders as:
Found 5 results in category: documentation
| Page | Score |
|---|---|
| About geohazardwatch documentation | 1.000 |
| Administrator documentation | 1.000 |
| AKA documentation | 1.000 |
| Asset documentation | 1.000 |
| Attachments documentation | 1.000 |
Count Format (inline)
There are [{Search system-category='system' format='count'}] system pages — renders as:
There are 21 system pages.
Titles Format
[{Search system-category='documentation' format='titles' max=8}] renders as:
Multiple Keywords (OR logic)
[{Search user-keywords='economics|geology' format='titles' max=5}] renders as:
Filter by Author
[{Search author='system' format='titles' max=5}] renders as:
My Pages (Author = Current User)
[{Search author='$currentUser' format='titles' max=10}] renders as:
Please log in to see your contributions.
Pages I Last Edited
[{Search editor='$currentUser' format='titles' max=10}] renders as:
Please log in to see your contributions.
Paginated Results
[{Search system-category='general' pageSize=5 page=1}] renders as:
Found 5 results in category: general
| Page | Score |
|---|---|
| airspace general | 1.000 |
| Alerts general | 1.000 |
| Android Earthquake Alerts general | 1.000 |
| Coronal Mass Ejection general | 1.000 |
| Current volcanic-ash SIGMETs worldwide general | 1.000 |
Notes
$currentUserinauthor=oreditor=resolves to the logged-in username. Anonymous visitors see a "Please log in" prompt instead of results.user-keywordssupports pipe-separated values for OR logic:'economics|geology'matches pages tagged with either keyword.pageSizeenables pagination; the current page is read from the?page=query string automatically, so pagination links work without any additional setup.
No comments yet.