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 : [EMAIL PROTECTED] *
  * Bat. Paul Dirac               |     or        [EMAIL PROTECTED] *
  * Campus de la Doua             | Telephone :     (+33) 472448429 *
  * F69622 Villeurbanne CEDEX     | Fax :           (+33) 472448004 *
  *******************************************************************

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to