This page updated 11 Jul 2011
Version note: Applies to Second Site 6 & 7
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 my Second Site Section cover other topics about customizing your site.
Topics Included in this Article
|Adding links to specific people|
|Adding links in Person Pages to other pages or sites|
|Adding citations to Main Pages and Custom Pages|
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:
The indexes and charts both have links to take the reader directly to a person's entry.
Within the section of one person, there are generally links to the sections of that person's parents and children.
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.
Link-Person Link User Items. User Items are described in my Second Site Overview article. Like other Link User Items, these can be used either to create site menu buttons that take the reader to the Person Page entry for the specified person. They can also be used to create links within the body of your Main Page or Custom Pages when you create them with the "building block" method described in my article on Adding Page Content.
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>
These scripts can be included in the content areas of the Main Page or of Custom Pages, in the "extra" content of the various page types, and in various other contexts where HTML is accepted. It can also be used in HTML files you include in the "-i" folder which are then made part of your site.It is easier to work with substantial amounts of text if you open the editor instead of working in the small fields, by putting the cursor in the field and pressing F7. But you must 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.
Instead of typing the the script manually, you can insert it in the text by using the "Macro" menu at the top of the editor screen, and selecting Person Page Link. Enter the person's name and ID# where indicated. If the name already appears in your text, select it before adding the link and it will be properly placed in the script.
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 three ways to do that:
Using the Flag Events – This works well if the linked page relates to a group of people in a general way. With this method you can style the links in various ways, and place them in the Person Page sections of the people they apply to. To do this you create a Flag in TMG to mark the people to whom the link will be applied, and create the events as described in my article on Flag Events.
Using the Groups Function – This works well if the linked page relates to a group of people in a general way, especially if you are creating a Custom Index for this same group. This method places a header in 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:
|([M1] \<A HREF="[M2]"\>[M3]\</A\>.)[:NP:]|
|Note will be in parens, with text, then link, period, closing paren.
M1 = text of note
M2 = URL for link
M3 = text of link
|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 Custom Page. Enter the contents of the Filename field on the Edit Custom Page screen, and add ".htm" – for example: Mims-map.htm
A complete Memo might look like this:
Which would produce output like this:
|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 ( " \ " ) 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.
Second Site has options in the Data > Sources section 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. The process involves three steps:
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.
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:
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:
If you want to include quotation marks within the citation detail, you need to double them because a stand-alone quotation mark is understood to signal the end of the citation detail text:
<%=Page.Cite(source number,"text ""quoted text"" more text")%>
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")%>
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.
These scripts 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.
Instead of typing the the scripts manually, you can insert them in the text by using the "Macro" menu at the top of the editor screen, and selecting Cite or Citation List.
|ReigelRidge Home||Terry's Tips Home||Contact Terry|
Copyright 2000- by Terry Reigel