The Flags section contains the list of Flag Events. Flag Events control the addition of content to person page entries. They are virtual events that Second Site creates based on flag values. Flag Events are added to the list of tags and you control their appearance via the Tag Groups feature.
You can use Flag Events to add a table to the person page entry that lists certain flag values, or use them to add literal text to a narrative.
Using Flag Events
You manipulate Flag Events via the list in the Flags section. This list is similar to other item lists such as the User Items list and shows the title of the Flag Event. You may enable or disable the Flag Event using the checkbox in the list or via the Enabled property in the edit window. The buttons below the list support adding, editing, deleting, and duplicating Flag Events in the list. You may edit an existing Flag Event by double-clicking the item.
Flag Event Properties
The Title property identifies the Flag Event entry. The title does not appear in the output.
The Person Filter properties determine which flag field Second Site uses to generate the Flag Event and the allowable flag values. A Flag Event will be added to the person page entry of the current subject if that person's flag value passes the filter.
The properties in the Event Details section determine the contents of the Flag Event.
The Label property is required and determines the label of the event. The label may appear in the output, and you also use it with the Tag Group Event Filter to control the inclusion of the Flag Event in a Tag Group. The label does not have to match an existing TMG tag type, and usually, it's advisable to make it different from any tag type that exists in your TMG project. You may assign the same label to more than one Flag Event.
The Role property is optional and determines the name of the role assigned to the subject when the virtual event is created. Unlike a Role used with a real event in your TMG project, the Role value does not have to match an actual Role name. When the Flag Event is output via a Tag Group that is a Table Panel or List Panel, you can configure the Tag Group to display the Role in the output. So, for Flag Events, the Role field is essentially an extra free-form text field.
You may use either of the special flag value codes in the Role text. See the Codes section below.
The Date property is optional and determines the date assigned to the event when the virtual event is created. If you want to assign a date, enter a valid date in the format "nn mmm yyyy" such as "18 May 2011".
The Sort Date property is optional and determines the sort date assigned to the event when the virtual event is created. If you want to assign a sort date, enter a valid date in the format "nn mmm yyyy" such as "18 May 2011".
The Memo property is optional and determines the memo assigned to the event when the virtual event is created. The default value is "[:FLAG-VALUE:]", a special code that Second Site converts to the value of the flag field used in the Person Filter. You may specify any memo text that you like, and you may use either of the special flag value codes in the memo text. See the Codes section below.
The Sentence property is optional and determines the sentence structure assigned to the event when the virtual event is created. The default value is "[M]". If you do not assign a sentence structure, the narrative output from the virtual event will be blank. You may specify any valid TMG sentence structure, and you may use either of the special flag value codes in the sentence text.
The Flag Event facility supports two codes that may be used in the Role, Memo or Sentence properties of the Flag Event. The
[:FLAG-VALUE:] code returns the value of the current flag for the subject. The
[FLAG-VALUE:] ... [:FLAG-VALUE] code converts the flag value for the current subject to a definition and returns the definition.
[:FLAG-VALUE:] code is simple to use; add the literal text
[:FLAG-VALUE:] anywhere in the Memo or Sentence text.
[FLAG-VALUE:] ... [:FLAG-VALUE] code requires a set of values between the starting code and ending code. The values are in pairs where the first value is a flag value that occurs in the TMG data and the second value is the literal text that you want to use as the definition of that flag value. This allows you to convert the terse codes to more understandable definitions. So, for example, you could convert "Y" to "Yes" and "N" to "No" as follows:
Commas are special when used inside the codes because they separate the pairs of values. To use a comma as part of a value, key the TMG backslash escape character before the comma.
This example uses two Flag Events to create a small table. The following web browser screenshot shows the resulting output.
Each of the "Immigrant" and "Related By" rows in the table are the result of Flag Events. A Table Panel Tag Group controls how the Flag Events are rendered in the person page entry. The Flag Events and Tag Group that produce this output are shown below.
In this example, multiple Flag Events use the same Label. This reduces the need to synchronize the Flag Event entries and the Tag Group entry. By using the same Label for all the Flag Events, the Tag Group does not have to change when adding additional flags to the Tag Group. The Role value differentiates between the different flags and is displayed in column one of the table.
Flag Event #1: Immigrant
The first Flag Event creates virtual events based on the Immigrant flag:
The Flag Event title is "Immigrant" and it uses a custom flag of the same name. All values of the Immigrant flag are acceptable. The Label is set to "Flags", and so the Tag Group that renders the Virtual Event must accept tags with that Label. The Role is set to "Immigrant". The value of the flag is shown via the
[:FLAG-VALUE:] code used in the Memo.
Flag Event #2: Related By
The second Flag Event creates virtual events based on the Related_By flag:
The Flag Event title is "Related By" and it uses a custom flag named "Related_By". All values of the Related_By flag are acceptable. The Label is set to "Flags", the same as above. The Role is set to "Related By".
The values of the Related_By flag are not as intuitive as the Y/N codes in the Immigrant flag. To make the values understandable, this Flag Event uses the
[FLAG-VALUE:] ... [:FLAG-VALUE] code to convert the flag values to definitions.
There are five pairs of values. The flag values are A, D, C, M, and U, and the words following each of those values are the definitions. Note that in the example output above, "A" has been replaced by "Ancestor".
The Tag Group used to create the table of flags is shown below.
Note that the Tag Group above is configured to select a single Tag Type named "Flags". That is not an actual Tag Type in the TMG project; the Labels assigned to Flag Events appear in the list of Tag Types in the Tag Group definition.
This page last changed on 05 Feb 2016.