This page created 11 Jul 2011
Version note: Applies to Second Site 4
Tag Groups is a new feature introduced in Second Site 4. It allows one to separate the Tags that are output in Person Pages into groups, which then can be separated from other groups of Tags to be placed in a specific sequence, and if desired formatted differently. This article describes that feature and offers some suggestions for its use.
Topics Included in this Article |
|
| Understanding the concept of Tag Groups | |
| Creating additional Groups | |
| Modifying the appearance of a Tag Group | |
| Using Tag Groups to create links to other pages | |
By default all Tags used in a site are output using a single Format selected by the user, and are output in a single sequence controlled by the Sort Dates of the individual Tags. In prior versions there was an option on the Pages > Format screen to separate the birth, marriage, death, and burial information at the top of each person's entry. That capability, together with many others described below, is now part of the Tag Groups feature.
Conceptually, Tag Groups are relatively simple. Using them involves these steps:
Two or more groups of Tags are created, with the Tags in each Group selected based on their Tag Types.
The Groups are sequenced in the order they are to appear in the Person Pages.
Each Group is assigned a "Type," which controls the formatting of the Tags in that Group. The main Group is assigned the Type "Body," and those Tags are formatted according to the Format selected on the Pages > Format screen. The other groups may also be of the Body type, or may assigned one of the three types of "Panels" – Narrative, List, or Table. The output of Tags in these Groups is formatted in one of these three styles, and the Panel itself may be sized, positioned, and styled as desired.
By default, all Tags are in the Body group, will be displayed according to the Format selected for the site, and will appear in Sort Date sequence.
Also by default, there is a BMDB First group, composed of all Tags in the Birth, Marriage, Death and Burial groups. It is also of the Body Type. This Group is by default inactive, unless your sdf file was imported from a prior version of Second Site, and in that version had the "BMDB First" option selected.
To group the BMDB Tags at the beginning of each person's section, as is done by default in TMG's Journal reports, you simply make the BMDB Group active. On the Pages > Tag Groups screen, click in the box in front of the BMDB First group, as shown in the screenshot below.
One appealing application for Tag Groups would be to collect all census Tags in a separate group, and present them in a table format to separate them from other Tags. Help contains some suggestions that should assist in doing this. To access that Help page, go to the Pages > Tag Groups section and press F1.
The following sections describe some other applications for the Tag Group feature, and suggest some ways to modify the formatting of Groups. The two sections that follow provide detailed instructions, using as an example a Narrative Panel to highlight research notes included for various people in a narrative-style site. Following that is a second example illustrating how Tag Groups can be used to provide a special section providing links to a Custom Page for specific people.
To create a new Group for special treatment of some Tags, go to the Pages > Tag Groups and click the Add button to open the Edit Tag Groups screen:

In this example I am creating a separate Group for my Research Notes Tag. I use that Tag record significant concerns about the data on a particular person, such as questions about whether I have the correct parents for that person. I want that Tag to appear after all other Tags, and to have the text set off in a box from the other text about the person.
On the Edit Tag Group screen I've entered data in these fields:
Title – Enter something that describes this event. In this case the Title is used only to identify this event in the list of Groups on the Tag > Groups screen, but I could make it appear at the top of the Group by checking the "Show Title" box.
Group Type – Select the Type for this Group from the second drop-down list. In this case I selected Narrative Panel because I wanted the text to be plain narrative style, and I wanted it to appear in a panel, narrower than the body text, with a contrasting border.
Tag Filter – On the Tag Filter tab, from the Tag Filter drop-down list I chose "Selected." I then scrolled down the list of Tag Types until I found "Resch Note" and double-clicked on the box in front of it to select it.
Exclude – Near the bottom of that screen I clicked the "Exclude from Body Groups" box. Normally one would want each Tag to appear only once. One could insure this by carefully specifying in each Group only those Tag Types that are to appear in that Group, but this would be tedious and error-prone as new Tag Types are added to your Project. The Exclude feature makes it simple to ensure that any one Tag will only appear in the first Group for which it qualifies.
On the Narrative Panel tab, I selected the "New Paragraph" Option. Since this is a Panel Group, which would automatically be set off from neighboring text, this would not ordinarily be necessary. But since I use this Tag Type also in TMG report, the Sentence for it begins with formatting codes to set of the output off this Tag from others in TMG's narrative reports. Checking this option causes any leading formatting, which is not needed in Second Site, to be ignored.
Other types of Panel Groups have other options on their corresponding tabs. Help explains them fully; to access it press the F1 key while the Edit Tag Group screen is displayed.
I want the note created by this Tag to be in a box centered horizontally on the page, so I made the following settings on the Panel Options tab:
From the Alignment drop-down list I selected "Center." I entered zero in the Width field so that the width of the Panel can be set by the reader's browser. I then adjusted that to 80% of the browser width with styles, as discussed below.
The output of this Tag Group is seen in this example:

The box around this note and other formatting details were produced by Stylesheet settings, as discussed next.
The appearance of most items in a site created with Second Site is controlled by Stylesheets, as described in my article on Customizing Themes and Layouts. This section discusses some specific styles that are useful in modifying the appearance of Tag Groups. There are a group of Styles in the Stylesheets > System section that apply specifically to Tag Groups, as outlined in the screenshot below:
In the example in the preceding section we defined a Narrative Panel Tag Group for research notes tags. This screenshot shows how I modified the styles in the Stylesheets > System > Narrative Panel screen to create the appearance shown in the sample output shown above. I made the following changes from the default values:
Border-width – I set to 2 pixels to create the colored border around the panel.
Border-color – I changed the border color to one previously used in my custom-styled site. To do that, I clicked in the border-color field, then pressed F7 to open the color editor. In the editor, I clicked on the Theme tab, and selected one of the colors I had previously used in my site.
Padding-bottom – I entered 10px to create some space between the bottom of the text and the border.
This example illustrates a method of using Tag Groups to create a special section at the top of the People Page section for specific people with links to Custom Pages with family background information for the person's family. In this case I used Flag Events to create the links, as described in my Flag Events article. The same result can be obtained with traditional TMG event Tags, but I think using Flag Events is simpler when a lot of people are involved because you do not have to add or remove actual Tags as you add or remove people from the group. Instead you simply change the value of the Flag used to create the Flag Event.
The objective was to create a section like that outlined in the example below:

I started by creating a new Tag Group:

For this application I made the following entries:
Title – In this application I wanted to display the Group Title so that people with more than one family link would have the section title appear only once. Otherwise I might have included the section heading in the Tag. I entered the actual text I wanted to display as the Title (the "–" term is the HTML code for an "en-dash").
Show Title – I checked this box so the Title would appear on the pages.
Group Type – In this case I selected Table Panel as the Type because that Type provides the type of output I was looking for. If the best Type isn't apparent, test several until you find the one that works best for your application.
Tag Filter – On the Tag Filter tab, from the Tag Filter drop-down list I chose "Selected." I then scrolled down the list of Tag Types until I found "Family," the Label I applied to the Flag Event when I created it.
Exclude – Near the bottom of that screen I clicked the "Exclude from Body Groups" box so this Tag Type would not appear in any other Groups.
On the Table Panel tab of the same screen I made the following selections:
I set the Column 1 Content to display the Memo from my Flag Event, since that is where I place the HTML code for the link. Since I didn't need other columns, I set their Contents to "None."
On the Panel Options tab I made the following entries:
I entered 0 in the width field so the link text will fill the entire width of the page if it is that long. I entered in the User Class field a class name of "family-background." I did this so that I could assign a User Style to this Tag Group that would remove the spacing that is automatically provided above the table (see below).
In order to have the section created by this Tag Group appear at the top of each person's Person Page entry, I moved this Group to the top of the list of Tag Groups. Note that the Research Note Group, described in the first example in this article, is placed at the bottom of the list so it will appear after all other tags:
The output of the various Tag Groups appear in the Person Pages in the order they appear in this list. You can re-order Tag Groups by selecting one and using the Up and Down button at the bottom of the screen, or by dragging it with your mouse.
I made one entry in the Stylesheets > System > Table Panel Cells screen. In the Padding-left field entered 2.6em so that the links provided by this Tag Group would line up with those provided in the Charts section above. I found that value by trial and error.
Because this Tag Group is a Table Panel blank space is automatically provided at the top of the Table, which would create a blank line between the section title and the link itself. To eliminate that space and properly space the bottom of the item, I created a User Style with these parameters:
| selector-1 | table.family-background |
| parameter-1 | margin-top: 0; margin-bottom: 1em; |
These setting produce the "Family Background" section shown in the example at the beginning of this example.
These two examples illustrate but a few of the many possibilities that the Tag Group feature offers to customize one's site. Hopefully they will suggest methods that will serve the needs of others.
The Second Edition of my sell-out book, A Primer for The Master Genealogist, is now available.
Details are can be seen here.
Copyright 2000-2012