00758: searching predefined sections of pages
Description: Is there a way to restrict searches to defined portions of pages?
Clearly pagelist templates can be used to return a defined portion of pages: the faq template uses an include that is delimited by the faq achors contained in pages to limit the displayed results to the portions of pages defined by the faq anchors.
What is unclear, however, is whether a search can be restricted to examining a defined portion of pages, so that the results will be restricted to pages where the search terms are contained within the defined portion. Or stated differently, the results will exclude pages where the search term appears in the page, but not in the defined portion of the page.
Example: The following searchbox uses the faqs template (and DocumentationIndex trail), and supplies a default search term "macIntosh" that should return only one page: AccessKeys
Search and Show FAQs, order by name (:searchbox trail=PmWiki.DocumentationIndex fmt=#includefaq order=name value='Macintosh':)
Search and Show FAQs, order by name
Note: The search term "Macintosh" does not appear in the defined faq portion of the page displayed above; it appears elsewhere in the page (second paragraph).