You are here: Foswiki>Tasks Web>Item11266 (06 Jul 2015, GeorgeClark)Edit Attach

Item11266: Implement templating search results

pencil
Priority: Enhancement
Current State: Needs Developer
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches: trunk
Reported By: ArthurClemens
Waiting For:
Last Change By: GeorgeClark
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

 

ItemTemplate edit

Summary Implement templating search results
ReportedBy ArthurClemens
Codebase trunk
SVN Range
AppliesTo Engine
Component
Priority Enhancement
CurrentState Needs Developer
WaitingFor
Checkins distro:ba995e0cb1d5
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins distro:ba995e0cb1d5
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r7 - 06 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy