Working With Site Documents; Making A Document's Site Window Frontmost - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide

Working With Site Documents

The Site window lists all of the pages, images, scripts, and other assets that compose a web site.
Double-clicking any HTML file in the Site window displays its content in a page-design window.
For each file, GoLive creates a a
window is frontmost, you can get a reference to this object from the
access a site's resources from the site document, as well as from the webSite object. The site document
provides references to the site's root folder and its home page. You can use these references in your own
code that calls
Files and
document's reparse method.
GoLive saves a site document as a .site file. When GoLive opens that file, it creates a document object
of type site and displays it in a Site window.
The
site
and site home page as
as the object for an HTML document), these properties are null .
To get the site's files, retrieve references to the contents of the site folder, by calling the siteReference
object's getFiles method:
// assume Site window frontmost
var contentsOfsiteFold = document.site.getFiles();
This returns a siteReferenceIterator that you use to get the individual files, as described in
files from a siteReference

Making a document's Site window frontmost

A
siteReference Object
address or a URL). A document object's
document.
document Object
file
Objects to manipulate files and folders in the site (as described in
Folders. " To show these changes in the Site window, you must update it by calling the site
and
properties of a site -type document object provide references to the site folder
homePage
siteReference
object.
encapsulates a reference to a document, file, folder, or link (such as an e-mail
Adobe GoLive CS2 SDK
of type site , called the site document. When a Site
Objects. For a document that does not represent a site window (such
property holds a siteReference object that represents the
ref
Managing Web Sites
document
global variable. You can
Chapter 9, "Managing
142
Getting

Advertisement

Table of Contents
loading

Table of Contents