User Guide
Site functions 257
Returns
A string, which specifies the site URL prefix.
Example
The following example gets the site URL prefix for the current document:
var currentDOM = dw.getDocumentDOM();
var sitePrefix = dom.getSiteURLPrefixFromDoc();
dom.localPathToSiteRelative()
Availability
Dreamweaver 8.
Description
This function converts a local file path to a site-relative URI reference.
Arguments
localFilePath
■ The localFilePath attribute, which is required, is a string that contains the path to a
local file on your local computer.
Returns
A string, which specifies the site-relative URI.
Example
The following example
var siteRelativeURI =
site.localPathToSiteRelative("C:\Inetpub\wwwroot\siteA\myFile.cfm")
returns "/myWebApp/myFile.cfm", based on your site mappings and the HTTP address
specified in the Local Info section of the Site Definition dialog box.
dom.siteRelativeToLocalPath()
Availability
Dreamweaver 8.
Description
This function converts a site-relative URI reference to a local file path.
000_DW_API_Print.book Page 257 Wednesday, July 20, 2005 11:58 AM