Chapter 3 DynaScript Predefined Objects


site object

Object

Describes a Web site. Using the site object, you can manage documents and database connections in your site, and customize the management interface to suit your needs.

Syntax

To use a site property:

site.propertyName

To use a site method:

site.MethodName( parameter ) 

Description

Note  

Only one site object allowed
You cannot create additional site objects in your scripts.

Script-based management

Management of Dynamo Web sites is driven by scripts. The site object provides methods that allow you to perform common management tasks:

Managing documents and connections

In a Dynamo Web site, you can manage documents and database connections either by using Sybase Central or by writing your own scripts. In either case, the site object is responsible for the basic management tasks:

Customizing the management interface

Because the Dynamo management tools are script-based, you can alter these scripts or create new ones to tailor the interface to your needs:

Example

This example creates a new connection called myConnection , and then creates a new document in the Web site to use the new connection. The contents of the new document is the word "hello":

<!--SCRIPT
newConn = site.CreateConnection ( "MyConnection", "my new connection", "PowerDynamo Demo" );
newDoc = site.CreateDocument ( "/Site/myDoc.stm", "text", "my new document", "hello", "MyConnection" );
-->

See also

For more information on the document object, see "document object".

For more information on the connection object, see "connection object".

 


Copyright © 1999 Sybase, Inc. All rights reserved.