[pmwiki-users] Fox Contacts and a table view

Hans design5 at softflow.co.uk
Fri May 16 15:41:31 CDT 2008

Friday, May 16, 2008, 8:55:49 PM, Scott Smith wrote:

> I'd like to have a table view of the contacts where the name,
> company and phone number are displayed. Also, I've slightly modified
> the form so the contact is either Active or Inactive. This list
> should only display 'Active' contacts.

try something like this:

pagelist to show custom table of active contacts:

(:pagelist group=Contacts $:active=1 fmt=#contactstable :)

pagelist template for this, modify to extract the ptv fields required,
change formatting, add more cells etc .
Add to Site.LocalTemplates:

(:template first:)
||cellpadding=3px border=1
||!First Name ||!Surname ||!Company ||
(:template each:)
||{{=$FullName}$:name1} ||{{=$FullName}$:name2}||{{=$FullName}$company} ||

The 2 lines after (:template first:) are for general table formatting
and for the table headings.
Active contacts have  a PTV named 'active' set to 1:
(:active: 1:)
inactive ones can have it set to 0.
The pagelist picks out the active ones with parameter $:active=1
The pagelist could have an extra order= parameter if required,
otherwise it is sorted by page name.


More information about the pmwiki-users mailing list