Tags:
create new tag
view all tags

SID-01953: How to combine SEARCH and INCLUDE

Status: Answered Answered TWiki version: 5.1.4 Perl version: 5.6.1
Category: CategorySearch Server OS: SLES 11.3 Last update: 11 years ago

Hi,

I try to create a topic which includes a list of section in other topics. The first $topic in format works ell, but $topic in the INCLUDE variable doesn't. Any ideas?

Regads, Daniel

%SEARCH{ "META\:TOPICPARENT.*\"%TOPIC%\"" web="IST" topic="^(SR)*" type="regex" nonoise="on" order="topic" header="|*Server:*|*Wartungsfenster:*|" format="| $topic | %INCLUDE{"$topic" }%"}%

-- Daniel Perabo - 2014-07-28

Discussion and Answer

TWiki evaluates variables inside-out, left-to-right. That is, in your case the INCLUDE is evaluated once before the SEARCH. You need to escape the INCLUDE so that it fires off once per search hit:

format="$percntINCLUDE{$topic}$percnt"

-- Peter Thoeny - 2014-07-28

Look also into much faster:

format="$text"

And into bookview="on"

Detail in VarSEARCH and FormattedSearch.

-- Peter Thoeny - 2014-07-28

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title How to combine SEARCH and INCLUDE
SupportCategory CategorySearch
TWiki version 5.1.4
Server OS SLES 11.3
Web server apache 2
Perl version 5.6.1
Browser & version Firefox 22
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2014-07-28 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.