Item11266: Implement templating search results
Priority: Enhancement
Current State: Needs Developer
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches: trunk
See:
Displays each search result in a different way, dependent on a new item view template. The template can be called using a new parameter
itemview
added to
SEARCH
:
%SEARCH{
...
itemview="$formfield(Attributes)"
}%
or
%SEARCH{
...
itemview="$web"
}%
So
itemview
can be filled with a form field value or the web or topic name, or any string using those values.
Template file
itemview.tmpl
is new. This renders the default item, to be used in search.
It can be overridden by param
itemview
and by skins, for example:
- PlaceItemViewTemplate.txt
- PersonItemViewTemplate.txt
- MySkinItemViewTemplate.txt
- MySkinSkinPlaceItemViewTemplate.txt
- MywebItemViewTemplate.txt
- MySkinSkinMywebItemViewTemplate.txt
TODO:
- Make
itemview
template the default display template for search
- Provide default CSS styles: base.css, pattern.css
- Better failure behaviour
- Documentation
--
ArthurClemens - 20 Nov 2011