SearchBoxArgs


Test to show that a pagelist faqs search returns a page where the search string exists in the page, but not in the Q&A pairing. (The term Macintosh appears in the second paragraph of the PmWiki.AccessKeys documentation).

Search and Show FAQs, order by name
(:searchbox trail=PmWiki.DocumentationIndex fmt=#includefaq order=name value='#faq Macintosh':)

Search and Show FAQs, order by name


Notes

  • You can search for anchors, e.g. "#faq"
  • Add a search results directive and all the boxes are filled in at once
  • How do you force a search term that is specified in the underlying directive to be included with the term added by the user, as with the FAQ search, where we want to limit all searches to pages that include #faq.
    • Pm just identified the answer in this post: Add value= to each of the (:searchbox:) entries. (The value parameter sets the default value for the searchbox).
    • Now I wonder whether there is any way to prevent the default value from displaying. While displaying the default value can be a good thing because it reveals the entire search term, which is a learning and diagnostic tool, a cleaner and more consistent look would result if the search box only contained parameters supplied by the searcher. For example, the searchbox can be limited to a particular group, or trail, but those search constraints will never appear unless the author chooses to explicitly display them, using (:markup:) or explanatory text.
Search All Documentation, order by page name
(:searchbox group=PmWiki fmt=#simplename order=name:)

Search All Documentation, order by page name

Search All Documentation, order by Title
(:searchbox group=PmWiki fmt=#title order=title:)

Search All Documentation, order by Title

Search Distributed Documentation, order by name
(:searchbox trail=PmWiki.DocumentationIndex  fmt=#simplename order=name:)

Search Distributed Documentation, order by name

Search Distributed Documentation, order by Title, Show Descriptions
(:searchbox trail=PmWiki.DocumentationIndex fmt=#description order=title:)

Search Distributed Documentation, order by Title, Show Descriptions

Search and Show FAQs, order by name
(:searchbox trail=PmWiki.DocumentationIndex fmt=#includefaq order=name value='#faq':)

Search and Show FAQs, order by name

Search Small Trail at [[Test/SearchBoxTrail]]
(:searchbox trail=Test.SearchBoxTrail fmt=#simplename order=name:)

Search Small Trail at SearchBoxTrail

Search Small Include at [[Test/SearchBoxInclude]]
(:searchbox group=Test name=SearchBoxInclude fmt=#simplename order=name:)

Search Small Include at SearchBoxInclude

Search Pagelist FAQ include results at [[Test/SearchBoxPageList]]
(:searchbox group=Test name=SearchBoxPageList fmt=#simplename order=name:)

Search Pagelist FAQ include results at SearchBoxPageList

 0: 00.00 00.00 EnablePost = 1, keys=
 1: 00.00 00.00 config start
 2: 00.02 00.01 config end
 3: 00.04 00.03 MarkupToHTML begin
 4: 00.04 00.03 MarkupToHTML begin
 5: 00.04 00.04 MarkupToHTML end
 6: 00.04 00.04 MarkupToHTML begin
 7: 00.04 00.04 MarkupToHTML end
 8: 00.04 00.04 MarkupToHTML begin
 9: 00.05 00.04 MarkupToHTML end
10: 00.05 00.04 MarkupToHTML begin
11: 00.05 00.04 MarkupToHTML end
12: 00.05 00.04 MarkupToHTML begin
13: 00.05 00.04 MarkupToHTML end
14: 00.05 00.04 MarkupToHTML begin
15: 00.05 00.04 MarkupToHTML end
16: 00.05 00.04 MarkupToHTML begin
17: 00.05 00.04 MarkupToHTML end
18: 00.05 00.04 MarkupToHTML begin
19: 00.05 00.04 MarkupToHTML end
20: 00.05 00.04 MarkupToHTML begin
21: 00.05 00.04 MarkupToHTML end
22: 00.06 00.05 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
23: 00.06 00.05 ReadApprovedUrls SiteAdmin.ApprovedUrls end
24: 00.06 00.06 MarkupToHTML end
25: 00.07 00.06 MarkupToHTML begin
26: 00.08 00.07 MarkupToHTML end
27: 00.08 00.07 MarkupToHTML begin
28: 00.08 00.08 MarkupToHTML end
29: 00.09 00.08 now
Peak memory: 3,941,688 bytes