The following information is intended for advanced users.
The Page object provides access to Page-related properties and methods.
For general instructions on using script statements, see the Script Usage page.
All the Page object properties are read-only.
Returns the HTML for the Character Index. The result is empty for all pages except the Surname Index.
Returns the page description. For pages created via User Items, Second Site sets Page.Description to the User Item Description.
Returns the Extra Content text for the current page. Standard Page Scripts add this text to either the Default Layout.Extra Content value or the Page Set-specific property value.
Extra content can only be specified for a specific page for Custom Pages. In all other cases, user-specified Extra content can only be set via the Static Content properties and that text is not returned by the Page.ExtraContent property.
For framed sites (see Layouts Section), returns "ssindex" for pages that are loaded in the index frame and "ssmain" for pages that are loaded in the main frame. For non-framed sites, returns an empty string.
Returns HTML tags for the current page that should be included in the HEAD element of the page. Standard Page Scripts add this text to either the Default Layout.Extra Head value or the Page Set-specific property value.
HEAD tags can only be specified for a specific page for Custom Pages and Custom Pages. In all other cases, user-specified HEAD tags can only be set via the Static Content properties and that text is not returned by the Page.HeadTags property.
Returns true if the current page has a page number and is part of a set of pages which should include "Previous Page" and "Next Page" links.
Returns an object that includes information about the "Next Page" link for the current page.
Returns the current page number.
Returns the name of the current Page Set, for example, "Main Page" or "Surname Index".
Returns the ID of the current Page Set, for example, "mainpage" or "surnameindex".
Returns the number of the current Page Set, for example, 1 for Main Page or 2 for Surname Index.
Returns an object that includes information about the "Previous Page" link for the current page.
Returns the Title of the current page.
Page.Cite() adds a citation to the current page and returns a citation reference number as a superscript. Page.Cite() is intended for use on Custom Pages and when combined with Page.CitationList() produces output that is similar to the citations that are automatically added to person page entries as a result of source citations in the TMG project.
For sourceNumber, specify a TMG source number or zero. For text, specify the text you want to use as the citation detail for the citation.
Page.Cite() produces the equivalent of an embedded citation, and it uses the same infrastructure within the Second Site program.
For all of the following examples, add the following Page.CitationList() call at the end of the Main Content section of the page:
He is the most experienced researcher for the Smith family.<%=Page.Cite(4,"self-proclaimed")%>
Please note that if you place multiple Page.Cite() calls in a row to cite multiple sources, you have to supply superscripted commas yourself:
He is the most experienced researcher for the Smith family.<%=Page.Cite(4,"self-proclaimed")%><sup>,</sup> <%=Page.Cite(62,"page 19, dissenting opinion")%>
Any source that you reference via the sourceNumber parameter will be included on a source page. If you do not want to cite a source, but instead want to add a text footnote that will appear in the page's citation list, set the source number to zero.
<%=Page.Cite(0,"This footnote doesn't link to a source.")%>
Using Page.Cite() in the SideBar or Extra Content sections is not recommended because of difficulty ensuring that the Page.Cite() calls are executed after the Page.CitationList() call.
Page.CitationList() produces a list of the Page.Cite() citations for the current page. Page.CitationList() creates HTML that is very similar to the HTML Second Site creates for the person page citation lists.
The Page.CitationList() method must occur after all calls to the Page.Cite() method. As a result, you should put the citation list at the end of the main content area.
If you want a section header prior to the list, you must supply the sectionTitle in the Page.CitationList() call. If you specify an empty sectionTitle, the Page.CitationList() call will not add a section header to the page.
For all of the following examples, add one or more Page.Cite() calls above the Page.CitationList() call shown below.
A citation list with a section header:
A citation list without a section header:
Returns the text for an HTML A element HRef parameter that will open the exhibit page for a linked exhibit with the given Topic.
When Second Site re-makes a site, exhibit page numbers may change due to changes in the TMG project. If you manually create HTML that links to an exhibit page, use the Page.ExhibitHRef() function to ensure that the HRef will be correct.
<a href="<%=Page.ExhibitHRef("J. Smith, 1928")%>"> Picture of Mr. J. Smith, circa 1928 </a>
It is up to you to ensure that the given exhibit has a linked exhibit page. If two or more exhibits have the same topic, Second Site will return a link to the first exhibit it finds.
Page.GetPageImage(imageCode, imageID, alt, title)
Second Site image codes are basically filenames with no filtetype; Second Site looks for an image with a name that matches the given image code and with a filetype of "gif", "jpg", or "png", in that order, and selects the first one it finds. This makes scripts more flexible; the user can provide images with any of the accepted HTML filetypes and the scripts will find the image.
GetPageImage first looks for an image that has the image code that is the concatenation of the given image code and the current Page Set number. If no such image is found, Second Site looks for an image with the given image code only.
If one of those two files exists, Second Site creates an HTML IMG element, including the width and height of the image (as determined by opening the image file), and appends an ID=, ALT=, and TITLE= parameter to match the imageID, alt, and title parameters from the GetPageImage function call.
Returns the text for an HTML A element HRef parameter that will open the person page entry for the person in the database with the given ID number.
Returns the text for an HTML A element HRef parameter that will open the place index page for place indicated by placeData. The place subfields must be specified in reverse sequence, with place levels separated by semi-colons. For example, "Massachusetts;Essex County;North Andover". Specify only the place levels you have selected for the place index.
<a href="<%=Page.PlaceIndexHRef("Ohio;Adams County;Rome")%>"> Rome People </a>
Returns the text for an HTML A element HRef parameter that will open the place information page for the place indicated by placeData. The place data must be specified in reverse sequence, with place levels separated by semi-colons. For example, "Massachusetts;Essex County;North Andover". Specify only the place levels you have selected for the place index and for which there is either a place comment or place exhibit.
<a href="<%=Page.PlaceInfoHRef("Ohio;Adams County;Rome")%>"> Rome Information </a>
This page last changed on 16 Jan 2011.