searchfn templating functions allow you to search pages - or more
generally content - returning collections of
ContentMap
objects.
The results are sorted by jcr:score(), descending. A text excerpt may
be available in the returned ContentMap depending on how Jackrabbit
search is configured. Magnolia checks the current user’s permissions
before adding a result to the collection.
Searching pages
The searchPages function searches pages for a given query string and
start path. This function searches only nodes of type mgnl:page in the
website JCR workspace, not all types of content. The returned items of
the collection are of type ContentMap. Use this function with the
mandatory arguments if you want to render the results with pagination.
The searchContent function searches all content for a given query
string, start path and node type in any workspace. If you don’t specify
a node type the function searches for the most basic type nt:base. The
returned items of the collection are of type ContentMap. Use this
function with the optional arguments (limit, offset) if you want to
render the results with pagination.