Terry's Second Site Tips

Tag Groups

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
Overview
Understanding the concept of Tag Groups
Adding Tag Groups
Creating additional Groups
Styles
Modifying the appearance of a Tag Group
A Second Example
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.

Overview

Conceptually, Tag Groups are relatively simple. Using them involves these steps:

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.

Adding Tag Groups

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:

Edit Flag Events 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:

In assigning Tags to Groups, Second Site examines first all Panel Groups, in the order in which they appear in the list on the Pages > Tag Groups screen, then all Body Groups. If the Exclude option is checked in each Group, Tags that appear in earlier Groups do not appear again in later one even if they would otherwise be included.

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:

Panel Options

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:

Example

The box around this note and other formatting details were produced by Stylesheet settings, as discussed next.

Using Styles to Modify the Appearance of a Group

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:

Syles for Tag Groups

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:

A Second Example

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:

Example

I started by creating a new Tag Group:

Add

For this application I made the following entries:

On the Table Panel tab of the same screen I made the following selections:

Options

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:

Options

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:

Sorting Tag Groups

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.

Conclusions

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.


ReigelRidge Home
Terry's Tips Home
Contact Terry

 

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