Guide

The end-user manual for PageSeeder

Custom Member Details

Overview

It is possible to extend the details for the Members of a Group by adding up to 15 custom Member fields for each Group. The information in these custom fields can be shared with other Groups that have the same Group Owner or it can be limited to only that specific Group. The fields can contain any data but the default limit is 100 characters.

Configuration

To configure custom Member details for a Group, follow the steps below.

  1. Go to the Group – Properties and create a name in the Details Form field under the Advanced Options tab (e.g. Software_Evaluation).

In PageSeeder 5.20 and before

  1. In the template style owner folder for your Project create a file:
    /Layout/page/group-member-groupdetails-[Details Form].properties
    (e.g. /template/myproject/Layout/page/group-member-groupdetails-Software_Evaluation.properties)
    1. In this file add all the following properties so that the numbers add up to 15:
      1. shared: if 'true' then all these details will be shared with other Groups that have the same Owner
      2. listed: the number of fields to be listed in the Member list (and also edited by the Member)
      3. writable: the number of fields not listed but can be edited by the member
      4. readonly: the number of fields that can be seen but not edited by the Member
      5. hidden: the number of fields that can not be seen by the Member
  2. Copy the default/Layout/page/group-member-groupdetails.xsl file to the same folder as the .properties above and then add your fields to the <xsl:template match="root" mode="extra-fields"> template (see example below).

From PageSeeder 5.22

  1. Simple create a XML Details config file as described in the API

 

Example Customization (PageSeeder 5.20 and before)

Following is a sample which defines five custom Member fields:

  • Organisation (listed)
  • Country (writable)
  • How...(writable)
  • Date (writable)
  • Notes (hidden)

The group-member-groupdetails-Software_Evaluation.properties contains:
 

shared=true
listed=1
writable=3
readonly=10
hidden=1

The extra-fields template in group-member-groupdetails.xsl has been modified as follows:
 

<!-- Template to override -->
<xsl:template match="root" mode="extra-fields">
  <input type="hidden" name="details" value="yes" />
  <div class="extra">
    <div class="organisation validate">
      <span class="title">Organisation: </span>
      <input type="text" name="field1" 
            value="{details/detailfield[number=1]/value}"
            size="45" maxlength="100"  />
      <div class="info">
        <p>The organisation that the member belongs to.</p>
        <p></p>
      </div>
    </div>
    <div class="country validate">
      <span class="title">Country: </span>
      <input type="text" name="field2"
            value="{details/detailfield[number=2]/value}"
            size="20" maxlength="100"  />
      <div class="info">
        <p>The member's country of origin.</p>
        <p></p>
      </div>
    </div>
    <div class="referral validate">
      <span class="title">How did you hear about PageSeeder?: </span>
      <input type="text" name="field3"
            value="{details/detailfield[number=3]/value}"
            size="45" maxlength="100" />
      <div class="info">
        <p>How did you hear about PageSeeder?.</p>
        <p></p>
      </div>
    </div>
    <input type="hidden" name="field4"
                 value="{if (details/detailfield[number=4]/value)
                  then details/detailfield[number=4]/value else
                  format-dateTime(current-dateTime(),
                  '[D] [MNn,*-3] [Y01]')}" />
    <xsl:if test="details/detailfield[number=15]/value">
        <div class="notes">
         <span class="title">Notes: </span>
          <input type="text" name="field15"
              value="{details/detailfield[number=15]/value}"
              size="45" maxlength="100" />
         <div class="info">
          <p>More information about the member.</p>
         <p>These notes are only displayed to managers of this
            group.</p>
        </div>
        </div>
    </xsl:if>
  </div>
  <script type="text/javascript"><xsl:comment>
    $('#ps-content-<xsl:value-of select="/content/@id" />
          div.extra>div.validate').psField({offset:300});
    $('#ps-content-<xsl:value-of select="/content/@id" />
         div.extra>div').psField({validate:false, offset:300});
  </xsl:comment></script>
</xsl:template>

Created on , last edited on