This question about Topic Markup Language and applications: Answered

Rendering search results using sectional includes

How can I use a sectional include to render each matching result from a SEARCH?

simple search results formatting:
%SEARCH{"QuestionForm" 
  type="query" 
  excludetopic="QuestionTemplate" 
  nonoise="on" 
  limit="4" 
  format="[[$web.$topic][$formfield(TopicTitle)]]"
  separator=" · "
}%
Are SEARCH blocks evaluated within HTML comments? · Duplicate notifications from MailerContrib for some, but not all users. Why? · Is there any possibilities to link JIRA to FOSWIKI · Can I port FoswikiOnAStick to a productive system ?

rendering a single entry:
%INCLUDE{"%TOPIC%" section="render-question" THETOPIC="Question0" }%

THETOPIC=[Question0] TopicTitle from FORMFIELD=[Is it possible to store topics and attachments on a RAID?] TopicTitle from META=[]

now, i'd like to combine the two:

rendering search results with a sectional include (defined on this page):
%SEARCH{"QuestionForm"
type="query"
excludetopic="QuestionTemplate"
nonoise="on"
limit="4"
format="%INCLUDE{"%TOPIC%" section="render-question" THETOPIC="$topic"}%"
}%

THETOPIC=[AreSEARCHBlocksEvaluatedWithinHTMLcomments] TopicTitle from FORMFIELD=[] TopicTitle from META=[]

THETOPIC=[DuplicateNotificationsFromMailerCon] TopicTitle from FORMFIELD=[] TopicTitle from META=[]

THETOPIC=[Faq26] TopicTitle from FORMFIELD=[] TopicTitle from META=[]

THETOPIC=[FoswikiOnAStick] TopicTitle from FORMFIELD=[] TopicTitle from META=[]

but, this didn't print out any of the FORMFIELD information


%STARTSECTION{"render-question"}%
<div>
THETOPIC=[%THETOPIC%]
!TopicTitle from FORMFIELD=[%FORMFIELD{"TopicTitle" topic="%THETOPIC%"}%]
!TopicTitle from META=[%META{"formfield" name="TopicTitle" topic="%THETOPIC%"}%]
</div>
%ENDSECTION{"render-question"}%

-- WillNorris - 19 Feb 2009

%SEARCH{"QuestionForm"
type="query"
excludetopic="QuestionTemplate"
nonoise="on"
limit="4"
format="$percntINCLUDE{$quot%TOPIC%$quot section=$quotrender-question$quot THETOPIC=$quot$topic$quot}$percnt"
}%

THETOPIC=[AreSEARCHBlocksEvaluatedWithinHTMLcomments] TopicTitle from FORMFIELD=[Are SEARCH blocks evaluated within HTML comments?] TopicTitle from META=[]

THETOPIC=[DuplicateNotificationsFromMailerCon] TopicTitle from FORMFIELD=[Duplicate notifications from MailerContrib for some, but not all users. Why?] TopicTitle from META=[]

THETOPIC=[Faq26] TopicTitle from FORMFIELD=[Is there any possibilities to link JIRA to FOSWIKI] TopicTitle from META=[]

THETOPIC=[FoswikiOnAStick] TopicTitle from FORMFIELD=[Can I port FoswikiOnAStick to a productive system ?] TopicTitle from META=[]

-- SvenDowideit - 19 Feb 2009
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads