SiteObject (open)
WHFS site object
Syntax
LOADLIB "mod::publisher/lib/siteapi.whlib";
OBJECTTYPE SiteObject
Properties
- PROPERTY cdnbaseurl
If set, CDN address of this site
- PROPERTY cdnroot
If available, the CDN address of this site, otherwise the locally hosted URL.
- PROPERTY id
Id of the site
- PROPERTY name
Name of the site
- PROPERTY outputfolder
Subfolder within the webserver root
- PROPERTY outputweb
Id of the webserver that hosts this site
- PROPERTY root
Id of the root folder of the site
- PROPERTY rootobject
Root folder WHFS object
- PROPERTY sitedesign
- PROPERTY webdesign
Name of the site design for this site
- PROPERTY webfeatures
List of webfeatures of this site
- PROPERTY webroot
URL of this site (non-CDN)
Functions
- STRING FUNCTION MapToCDN(STRING inlink)
Maps a locally hosted URL to the equivalent URL on the CDN
- OBJECT FUNCTION OpenByPath(STRING path, RECORD options)
Open a file or folder relative, with a path relative to the site root
- MACRO Refresh()
Reload all properties from the database
- MACRO SetPrimaryOutput(INTEGER newoutputweb, STRING newoutputfolder)
Updates the current webserver and relative url within that webserver where this site is hosted locally.
- RECORD FUNCTION UpdateSiteMetadata(RECORD metadata)
Update the metadata for this site