Site functions, Dom.getsiteurlprefixfromdoc(), Dom.localpathtositerelative() – Adobe Dreamweaver API Reference CS5 User Manual
Page 221

216
DREAMWEAVER API REFERENCE
Site
Last updated 8/27/2013
Site functions
Site functions handle operations that are related to files in the site files. These functions let you perform the following
tasks:
•
Create links between files
•
Get, place, check in, and check out files
•
Select and deselect files
•
Create and remove files
•
Get information about the sites that the user has defined
•
Import and export site information
dom.getSiteURLPrefixFromDoc()
Availability
Dreamweaver 8.
Description
This function gets the site URL prefix that is extracted from the HTTP address defined in the Local Info section of the
Site Definition dialog box.
Arguments
None.
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 = currentDOM.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.