[pmwiki-users] How to list pages that have a page password

Alain Castera alain.castera at in2p3.fr
Thu Apr 10 09:19:44 CDT 2008


On Wed, 9 Apr 2008, Randy wrote:

> I can successfully make conditions:
> (:if eq '****' {(substr '{{*$FullName}$PasswdRead}' 0 4)} :) the page has a 
> password!
> (:if eq '***X' {(substr '{{*$FullName}$PasswdRead}' 0 4)} :) this line should 
> not appear (it just proves the condition isn't always true)
>
> But in a pagelist, this fails:
> (:pagelist group=Public if="eq '****' {(substr '{{=*$FullName}$PasswdRead}' 0 
> 4)}" :)

I never tried too much complex conditions inside the pagelist markup. I 
prefer to use the pagelist markup to restrict as far as possible the 
number of files to be investigated (i.e. playing mainly with Group and 
Name), and use a dedicated format to investigate variables inside the 
selected pages. This gives something like (from the top of my head, check 
syntax !) :

>>comment<<
to avoid displaying the format lines
[[#passFormat]]
(:if eq '****' {(substr '{{*$FullName}$PasswdRead}' 0 4)} :)
{$FullName}} \\
(:ifend:)
[[#passFormatEnd]]
>><<
(:pagelist group=Public fmt=#passFormat#passFormatEnd:)

You can also use the (:template xxx:) directives to build a nicely 
formated list.

Hope this helps

Alain

  *******************************************************************
  *        Alain Castera                                            *
  * IPNL - UCB Lyon 1             | e-mail : alain.castera at in2p3.fr *
  * Bat. Paul Dirac               |   	or        castera at in2p3.fr *
  * Campus de la Doua             | Telephone :     (+33) 472448429 *
  * F69622 Villeurbanne CEDEX     | Fax :           (+33) 472448004 *
  *******************************************************************



More information about the pmwiki-users mailing list