Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
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![]() 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 CaseThe parent topic of this topic is: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Solution 3: Using IF statementThis pattern can be rewritten using%IF% , removing the dependency on SpreadSheetPlugin: | ||||||||
Line: 255 to 255 | ||||||||
Test case | ||||||||
Added: | ||||||||
> > | ||||||||
Public webs of TWiki. | ||||||||
Changed: | ||||||||
< < | Search: WebHome
Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> | |||||||
> > | Search: WebHome
Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> | |||||||
Line: 269 to 270 | ||||||||
![]() 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: | ||||||||
< < | ||||||||
> > | ||||||||