[pmwiki-users] FW: pagelist with intext check

Petko Yotov 5ko at 5ko.fr
Mon Oct 18 21:57:35 PDT 2021


 From the cookbook page it looks as if you would need to use {=$FullName} 
otherwise it checks the currently browsed page instead of the remote 
page:

   if="intext 'text to check' {=$FullName}"

Does this work?


BTW in some cases you may not need to use this conditional, just add the 
search terms in your pagelist like this:

(:pagelist group=Main fmt=#default separate terms all required 
-excluded:)

or:

(:pagelist group=Main fmt=#default "some phrase":)

The one with separate terms should be orders of magnitude faster as in 
most cases it doesn't need to open individual page files, just the page 
index.

Unlike the cookbook recipe, the core finds directives like (:noheader:) 
or (:table:) if you search for those.


Petko

On 19/10/2021 02:36, david at classic-sf.com wrote:
> I'm attempting to list pages containing specific text and failing. I'm
> certainly doing something silly.
> 
> I have added 'if intext' to my config.php as per
> https://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples#intext 
> and
> using it as (:if intext 'xxxxx' ) works OK.
> 
> If I attempt to use in a pagelist it doesn't. (:pagelist if="intext 
> 'text to
> check'":). What have I missed?
> 
> Regards
> 
> Dave Cooke.
> 
> PS thanks in advance for any advice.



More information about the pmwiki-users mailing list