Terry's Second Site Tips

Useful Tricks

This page created 5 May 2009

Version note: Applies to Second Site 2 & 3

This article describes several special features of Second Site that can be useful in various situations. While they might be described as "advanced" features, they can be very useful it you have the need they were designed to fill, and worth learning how to apply. Other articles in this group cover more generally applicable topics.

Topics Included in this Article
People Links
Adding links to specific people
Links to Other Pages
Adding links in Person Pages to other pages or sites
Citations
Adding citations to Main Pages and Custom Pages

Creating Links to People

Second Site automatically provides a number of ways for readers of your site to navigate from the Person Page section of one person to the section for another person:

Still, one may want to create additional links. For example, in your Main Page you might want to create direct links so that readers can easily navigate to the Person Page sections for people of special interest. In my article on Virtual Sub-Sites I suggest creating Custom Pages with notes about each family line, including in them links to special people in the family.

In theory, one could, if clever enough, create such links manually. But that is error-prone, difficult for most users, can be "broken" by various changes in your TMG data or Second Site settings.

Second Site provides two solutions, each of which is useful in different contexts. In both cases, you use the target person's TMG ID number as the key, and Second Site then automatically re-directs the link to the correct page no matter what changes are made to the site layout.

Both of these methods depend on the TMG ID number you enter. If you change the ID number of the target person in TMG, for example by using the Renumber People feature, your links will then be directed to the wrong people.

<%=Page.PersonHREF(475)%>

The red number is the ID# of the person whose entry you want to link to. This code is generally used in an HTML link tag you are creating manually, for example:

<A HREF="<%=Page.PersonHREF(475)%>">Linah Mims</A>

Such HTML statements can be included in the content areas of the Main Page or of Custom Pages, or in the "extra" content of the various page types. It can also be used in HTML files you include in the "-i" folder which are then made part of your site.

Enter this HTML code with the Text Editor, not the HTML Editor (typing them in the HTML editor causes them to to be treated as plain text, not HTML code). You open the Text Editor by holding Shift when you press F7 to open the editor.

Adding Links in Person Pages

You may want to provide links on the Person Page sections of selected people to a Custom Page that includes information associated with that person. There are at least two ways to do that:

Using the Groups Funtion – This works well if the linked page relates to a group of people in a general way. This method places a header at the top or bottom of the Person Page sections of the people included, like the "Charts" header that is produced when you have a person who is included in a chart. To do this you use the Groups feature, described in my article on Creating Indexes.

Embedding Links within the Text – This works well if the linked page is related to a particular event or time period in the person's life, or if the link applies to only one or a few people. Because the link appears within the text, its can be associated with specific events in the person's life. The link does not have to be to a page that is created with Second Site; it can even be to an entirely separate site.

With this method you add Tags in TMG to the people who you want to link to the designated page. The Tags contain the appropriate HTML code, and are placed where you want them by use of Sort Dates. I use a custom Tag Type I call "xref-link" for this purpose:

Principal Sentence:
([M1] \<A HREF="[M2]"\>[M3]\</A\>.)[:NP:]
Witness Sentence:
same
Reminder:
Note will be in parens, with text, then link, closing paren, period.
M1 = text of note
M2 = URL for link
M3 = text of link
Use:
Locate the Tag properly by use of Date or Sort Date, and enter the three Memo segments as described by the Reminder. Exclude this Tag when creating reports in TMG. The URL in the second segment is the Filename of the SubPage on which the Map is placed. Enter the contents of the Filename field on the Edit SubPage screen, and add ".htm" – for example: Mims-map.htm

A complete Memo might look like this:

For background see||Mims-map.htm||map

Which would produce output like this:

(For background see map).

Notes:
1. The output is designed to produce a note enclosed in parenthesis. If that is not desired, remove the parenthesis and the [:NP:] code.

2. The escape characters (escape characters) are required to keep Second Site from interpreting the angle brackets as conditional brackets.

This Tag is designed so that once it is created, the user doesn't have to be aware of any of the details of the HTML coding required. Simply enter the required items in the Memo and the Sentence arranges them into the required HTML coding.

There is an alternate method, which allows the link to be embedded directly in the text produced by an event Tag, but it requires one to enter the entire HTML code each time, making it more difficult to use. If the Tag is also to be used for TMG reports, the HTML coding must be concealed from the TMG Report, adding to the complexity of the coding. For those interested in trying this method, the following might be entered in the Memo field:

[HID:][SS:](for background see <A HREF="Mims-map.htm">map</A>)[:SS][:HID]

The above coding would be embedded with any other text that might be in the Memo. The "hidden" codes – [HID:]...[:HID] – keep the coding from appearing in TMG reports, while the special codes Second Site codes – [SS:]...[:SS] – tell Second Site to ignore the hidden codes. This method works well, but requires the user to correctly enter it for each time it is used.

Adding Citations

Second Site has options on the Data > Sources screen to include the source citations from your TMG data in the People Pages of your site. There are occasions when you might want to add citations to other pages as well. For example, if you provide background information on the Main Page of your site you may want to provide citations for some of your statements. When I created my Family Introduction pages in my Narrative Family History site I provided background on each family in which I wanted to cite my sources (see my article on Virtual Sub-Sites).

Adding citations to the text in your Main Page or a Custom Page (or the Main Page too) is pretty simple with the Page Citation feature (version 2.2 and later). The process involves three steps:

  1. Create the Source – if the source you want to cite does not already exist in your TMG Project, add the Source to the Master Source List in TMG. Note the Source Number.

  2. Enter the citation script codes – in the text in the Content area of the Main Page or Custom Page where you want the reference number to appear. When you enter these codes in the content text, citation reference numbers are produced in the output text, and the information is ready for creating the footnotes. The code you enter might look like the following example:

Thomas and Mellyanne had several children, including John, born, baptized 3 May 1705 at St. Peters Parish, New Kent Co.<%=Page.Cite(1478,"pg 375, baptism of Jno son of Tho Mims")%>

The part in red is the citation entry. The format is this:

<%=Page.Cite(source number,"text of citation detail")%>

If there is nothing to enter in the citation detail, keep the quotation marks with nothing between them:

<%=Page.Cite(source number,"")%>

If you place two or more citations in a row you need to add the superscripted comma to separate them"

<%=Page.Cite(source number,"citation detail")%><sup>,</sup><%=Page.Cite(source number,"citation detail")%>

You can create a stand-alone footnote by entering a "source number" of zero and placing the text of your footnote where the "citation detail" would be entered.
  1. Specify where the Notes are to Appear – by entering the citation list code that tells Second Site where to place the footnotes. This code must appear after the last citation code. You enter something like this:

    <%=Page.CitationList("Citations")%>

The text within the quotation marks becomes the sub-header that will appear above the notes. Using "Citations" matches the format of the citation list that appears at the end of each person's section in the Person Pages, but you can use whatever text you prefer. If you want no heading, omit the text between the quotation marks.


ReigelRidge Home
Terry's Tips Home
Contact Terry

 

My sellout book, A Primer for The Master Genealogist, is now available.

Details are can be seen here.

 

Copyright 2000-2010