Hi, On Tue, Oct 14, 2008 at 2:55 PM, Owen Leonard <[EMAIL PROTECTED]> wrote: > That seems like a real solution. Anyone care to bring their superior > skills to bear on this problem?
A suggestion - search term highlighting boils down to generating a list of words, some of which should be styled with the highlight and other that should not. Instead of having the code know about the CSS class to use for a given word and worry about HTML escaping, it could be changed to emit a template structure like this: record_snippet => [ { word => 'normal' }, { word => 'highlighted', highlight => 1 }, { word => 'normal' } ] that would be consumed like this: <TMPL_LOOP NAME="record_snippet"> <TMPL_IF NAME="highlight"> <span class="highlight"><TMPL_VAR NAME="word" ESCAPE="HTML"></span> </TMPL_ELSE> <TMPL_VAR NAME="word" ESCAPE="HTML"> </TMPL_IF> </TMPL_LOOP> I can toss together a patch for this. Regards, Galen -- Galen Charlton VP, Research & Development, LibLime [EMAIL PROTECTED] p: 1-888-564-2457 x709 skype: gmcharlt _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel