Overview

The List of People User Item is a Content Item that creates a list of people on a Custom Page. The list may have from one to many columns including data from the person record and/or selected events. You can select people for the list using a Custom Flag value, and you may further limit the list based on the number of events that pass filters you define. So, for example, you could create a list that includes everyone who has one or more Address events.

The List of People User Item is a Content Item. It does not create a page of its own and so you must place it on a Custom Page.

The Custom Page Help page includes examples of how to use User Items.

Example

The example below shows the person's name, birth year (from the primary Birth event), and the year and spouse name (from primary Marriage events).

Name Birth
Year
Marriage
Year
Spouse
Bezanson, Eunice W. 1804 1820 Frederick Levy
1825 Henry Cross
Bezanson, George 1804 Mary Millet
Bezanson, Sarah E. E. 1808 1828 David C. Vaughan
Millet, Mary 1775 1796 James J. Vaughan
1804 George Bezanson
Vaughan, Anne 1800 Peter Keiser
Vaughan, David 1795 1822 Sarah Bezanson
Vaughan, James 1802 1824 Lucy Vaughan
Vaughan, James J. 1777 1796 Mary Millet
Vaughan, Mary C. 1798 1819 Ambrose Allen

Eunice Bezanson and Mary Millet have two spouses each, and their entries have "subrows" to include both spouses. The List of People item will include as many subrows as necessary based on the count of qualifying events for each person.

Although not shown in this example, on a real site the names of site members will be links to their person page entries.

Edit List of People

The Edit List of People window controls the properties associated with the User Item. The window includes a list where you add one or more "List Content" subitems to add columns to the list.

  • Add a Person Field item to add data from the person record to the list. Each Person Field item creates one column in the output. See the list of person field choices below.
  • Add an Event Field(s) item to add data from selected events to the list. Each Event Field(s) item may add one or more columns to the list, and if the person has multiple events that qualify, the list will include a "subrow" for each.
  • Add an Spacer item to add an empty column to the list.

Enabled

See Enabled on the User Items page.

Title

Enter a title for the user Item. The title is displayed as part of the List of People output if Show Title is checked.

Page Section

See Page Section on the User Items page.

User Class

The User Class textbox allows you to specify the name of a CSS class that will be added to the list's container. Add a user class to customize the appearance of a particular list. See the HTML and CSS Information below for more details.

Sort

The Sort pull-down menu controls the sequence of the people in the list. The choices are By Name and By ID. The Default is By Name.

When sorting by name, Second Site uses the "Surname display" template to format the name for the sort key.

Flag Filter

The Flag, Include/Exclude, and Values properties are used to define a Flag Filter that Second Site uses to restrict the people included in the list.

Use a Flag Filter whenever possible. If you rely solely on the presence of events to determine who will be included in the list, Second Site will do a lot of processing to determine who should be included in the list.

Name Format

The Name Format pull-down menu has the following choices: Surname, Given and Given Surname. Both choices show all the parts of the name that are included in the output template even though only two parts (surname and given) are mentioned. Surname, Given uses the "Surname display" template for the Name Style, and Given Surname uses the "Output" template for the Name Style. The default is Surname, Given.

The Name Format property affects names rendered by Person Field items. Names rendered via sentence variables, such as [P] or [PO], are formatted according to the "Output" template for the Name Style.

Name Options

The Name Options pull-down menu has the following choices: Full Name and Name (Middle Initials). The latter conserves horizontal space in the list, but loses detail by abbreviating middle name(s).

Date Format

The Date Format pull-down menu controls the format of dates rendered by Person Field items. It has the same choices as the date formats property described in the Dates section. The default is "Aaa YYYY/MM/DD".

Dates rendered via event variables, such as [D], are formatted according to the Person Date Format defined in the Dates section.

Person Fields

Person Field items create a single column in the output. To add a Person Field item, click the [Add...] button in the List Contents panel, then select Person Field in the Choose Item Type window.

Title

The Title of a Person Field item is used as the column header for the item.

Field Choices

Select an entry from the Field pull-down menu to set the content of the column. The choices are as follows:

FieldDescription
NameThe person's primary name
Given NameThe GivenName field from the person's primary name
SurnameThe Surname field from the person's primary name
GenderThe person's gender
FatherThe primary name of the person's father
MotherThe primary name of the person's mother
ReferenceThe reference field value for the person
Birth DateThe primary birth date of the person
Birth YearThe year from the primary birth date of the person
Death DateThe primary death date of the person
Death YearThe year from the primary death date of the person
Last EditedThe last edited date of the person

Event Fields

Event Field(s) items create one or more columns in the output for each item. To add an Event Field(s) item, click the [Add...] button in the List Contents panel, then select Event Field(s) in the Choose Item Type window.

Title

The Title of an Event Field(s) item is used only as the item name in the list of items.

Event Filter

The Event Filter panel includes multiple properties to select events.

You may filter tags based on the Tag Type, the primary marker, and whether or not the person is attached to the tag as a principal or witness.

If the person has multiple events that pass the filters specified for the item, the list will include multiple subrows in the output as shown above in the example.

Memo Contents

Use the Memo Filter Operator and Value properties to select events based on the contents of the event memo.

Primary and Witnessed

Use the Primary Tags and Witnessed Tags pull-down menus to select events that are primary or non-primary, witnessed or not.

Count of Tags

You may restrict which people are included in the list based on the number of events that qualify for the current Event Field(s) item using the Min Tags and Max Tags properties. If the number of selected tags is less than the minimum or more than the maximum, the entire row for the person will be omitted and so the person will not appear in the list.

Output Columns

A single Event Field(s) item may produce from zero to many output columns. You define the output columns using sentence structures that are similar to TMG sentence structures. The Heading Sentence Structure creates the heading columns, and the Output Sentence Structure creates the data columns. The || characters separate columns. For example, to create two columns:

Heading Sentence Structure:Date || Place
Output Sentence Structure:<[D]> || <[L]>

The || characters must be entered exactly as shown. So, for example, do not add a space between them ("| |") and do not specify the escape character (\|\|).

If the number of columns in the Heading Sentence Structure does not match the number of columns in the Output Sentence Structure, Second Site will use the lower of the two values.

Heading Sentence Structure

The Heading Sentence Structure will typically include literal text for each column of output defined in the Output Sentence Structure.

You may include the [:CR:] printer code to create multi-line headings. So, for example, the Heading Sentence Structure for the two Marriage columns in the example above was:

Marriage[:CR:]Year || Spouse

Output Sentence Structure

The Output Sentence Structure textbox determines the contents of the columns. You may use TMG sentence structure variables and also the special variables described below to determine the contents. Typically, you will want to use conditional references to TMG variables, <[D]>, for example.

The Output Sentence Structure for the two Marriage columns in the example above was:

<[Y]> || <[PO]>

Special Variables

As explained above, you use TMG variables to define the contents of the columns. You may also use the following variables and codes:

VariableDescription
[SS-DECADE]Returns the decade derived from the date of the tag.
[SS-PEOPLE]Returns a list of all the people attached to the event.
[SS-OTHERPEOPLE]Returns a list of all the people attached to the event but excludes the subject.
[SS-ROLENAME]Returns the name of the role of the subject for the current tag.
[SS-SENTENCE]Returns the output derived by processing the subject's sentence structure for the current tag.
[SS-TAGLABEL]Returns the label of the current tag.
[:SS-CS:]Returns a comma and a space if the prior output for the column is not empty, or returns an empty value otherwise.

The [:SS-CS:] variable is useful when combining output from multiple variables in a single column. For example, if you have defined the cell content sentence structure as <[D]><[:SS-CS:][L]>, the table below shows various possible results given the dates and places shown:

DatePlaceResult
1 June 1940Massachusetts1 June 1940, Massachusetts
1 June 1940empty1 June 1940
emptyMassachusettsMassachusetts
emptyemptyempty

Spacer

Spacer items create a single empty column in the output. To add a Spacer item, click the [Add...] button in the List Contents panel, then select Spacer in the Choose Item Type window. A Spacer item will be added to the list immediately; Spacer items have no editable properties, so there is no edit window. You may add and delete Spacer items, and move them up or down in the list, but they are not editable.

Subrows

If you include Event Field(s) in the list and a person has more than one qualifying event, the list will include one subrow for each such event. If a list has two or more Event Field(s) items, the number of subrows will vary according to the events that exist for each person. The example above shows how subrows appear in the output.

When you have multiple Event Field(s) items, columns for one event may appear to be associated with columns from another event. For example:

Name Spouse Census
Doe, Jane 1943, John Smith 1930, Massachusetts
1967, George Jones 1940, Vermont

Jane's 1943 Marriage to John Smith is not associated with her appearance on the 1930 Census, and her marriage to George Jones in 1967 is not associated with her appearance on the 1940 Census.

You may use the Spacer item to separate groups of event columns. So, for example, if you add a Spacer item between the Birth and Marriage items, and also between the Marriage and Census items, the list above will now look like this:

Name Spouse Census
Doe, Jane 1943, John Smith 1930, Massachusetts
1967, George Jones 1940, Vermont

The extra spacing helps to separate the column groups.

HTML and CSS Information

The following information is intended for advanced users.

The Stylesheets.System.Lists of People section controls the appearance of the List of People output. The following subsections describe how to use the User Class combined with Free Form User Styles to customize the appearance of the output.

Invent a class name and key it in the User Class property of the List of People User Item. In the following subsections, the User Class is assumed to be "mylop", but you may use something different if you prefer.

Second Site assigns the User Class to the TABLE element. The subsections below describe how to use the User Class to construct selectors that match the table or items within it.

Table

Second Site uses an HTML TABLE element for the List of People output. If you want to change a CSS property that does not appear in the Stylesheets.System.Lists of People.Table section, or if you have multiple List of People items and you want one to be formatted differently from the others, add a Free Form User Style as follows. In this example, the background color is changed to yellow.

selector-1:
table.mylop
parameters-1:
background-color: #ff3;

Rows

Second Site uses an HTML TR element for each row in the List of People output. Typically, you will not want to alter the CSS attributes of a row because most of the visible characteristics are associated with the cell (TD or TH element) and not with the row (TR).

Second Site assigns the class "lop-np" to each row that starts the output for a new person. The "lop-np" class is not assigned to subrows.

In the following example, odd-numbered rows are assigned a light-gray background color using the CSS "nth-child" pseudo-class. If the usual background color is not light-gray, the table will be striped: the background color for each person will alternate between light-gray and the other color. This technique will not work properly in a table that has subrows.

selector-1:
table.mylop tr.lop-np:nth-child(odd)
parameters-1:
background-color: #ccc;

Column Headings

Second Site uses an HTML TH element for heading cells in the List of People output. Each cell is assigned a class that varies based on the column number, so the heading cell for column 1 is assigned the class "lop-c1", column 2 is assigned the class "lop-c2", etc.

In the following example, the text for the first column heading is left-aligned. (The default alignment for heading cells is centered.)

selector-1:
table.mylop th.lop-c1
parameters-1:
text-align: left;

Data Cells

Second Site uses an HTML TD element for data cells in the List of People output. Each cell is assigned a class that varies based on the column number, so the data cell for column 1 is assigned the class "lop-c1", column 2 is assigned the class "lop-c2", etc.

In the following example, the text for the data in the second column is centered. (The default alignment for data cells is left-aligned.)

selector-1:
table.mylop td.lop-c2
parameters-1:
text-align: center;

Column Headings and Data Cells

If you want to alter both the heading cell and the data cells in a column, you can omit the element name (TH or TD) and use the column number class to select the column. In the following example, the background color of column 2 is changed to light blue.

selector-1:
table.mylop .lop-c2
parameters-1:
background-color: #add8e6;
On This Page

See also: