Daya Bay Reactor Neutrino Experiment
TWiki > SearchPatternCookbook (6 vs. 7)
Daya Bay webs: Public | 中文 | Internal | Help   Log In or Register

Welcome | Register | Changes | Topics | Index | Search | Go
 <<O>>  Difference Topic SearchPatternCookbook (7 - 2013-04-23 - TWikiContributor)
Line: 1 to 1
 
META TOPICPARENT name="FormattedSearch"

Search Pattern Cookbook

Line: 188 to 188
 However, the $parent link fails if the topic has no parent set ($parent will be empty). You can use some TWiki:Plugins/SpreadSheetPlugin magic to conditionally link to the parent or to WebHome:
Changed:
<
<
$percntCALC{$IF($EXACT($parent,),,$NOP( * $parent))}$percnt
>
>
$percntCALCULATE{$IF($EXACT($parent,), , $NOP( * $parent))}$percnt
 

So the total Search query to find a topic's parent topic is:

Changed:
<
<
>
>
 

Test Case

The parent topic of this topic is:

Changed:
<
<
>
>
 

Solution 3: Using IF statement

This pattern can be rewritten using %IF%, removing the dependency on SpreadSheetPlugin:
Line: 255 to 255
 

Test case

Added:
>
>
  Public webs of TWiki.

Changed:
<
<
Searched: WebHome

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

>
>
Searched: WebHome

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

Number of topics: 1

 
Line: 269 to 270
 TIP For private webs, or any other webs you wish to exclude from the display, use "on" for the Exclude web from a web="all" search setting in the relevant web's WebPreferences topic.

Alternative solution

Added:
>
>
  This result can also be accomplished with the %WEBLIST% variable.

Changed:
<
<
>
>
 

View | History: r7 < r6 < r5 < r4 | More

View | History: r7 < r6 < r5 < r4 | More
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SearchPatternCookbook.