You are here: Foswiki>Tasks Web>Item11318 (02 Dec 2011, JayenAshar)Edit Attach

Item11318: SEARCH macro gives p tags when there are no results

pencil
Priority: Low
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: SEARCH
Branches:
Reported By: JayenAshar
Waiting For:
Last Change By: JayenAshar
When using the SEARCH macro and there are no results, an empty paragraph
<p></p>
is returned rather than a plain text blank line. This is even with zeroresults="off". I have tried using format="$topic" and format="$web.$topic".

-- JayenAshar - 01 Dec 2011

Hrm, this might be more for when I concatenate two searches as in Support.Question981. I'll get back to you.

-- JayenAshar - 02 Dec 2011

ok, i managed to do this in a non-intuitive way. basically, in Support.Question981 I have an array of SEARCHes I want to concatenate. I want the results line separated. That is, if a SEARCH has zero results, I want nothing, and if it has results, I want a newline at the end. Looking at the code, I believe the only way to do this is with:
  format="<nop>$topic$n" 
  nofinalnewline="off"
  separator="" 

-- JayenAshar - 02 Dec 2011
 

ItemTemplate edit

Summary SEARCH macro gives p tags when there are no results
ReportedBy JayenAshar
Codebase 1.1.3
SVN Range
AppliesTo Engine
Component SEARCH
Priority Low
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
trunkCheckins
Release01x01Checkins
Topic revision: r2 - 02 Dec 2011, JayenAshar
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