Document.addrelatedfile() – Adobe Dreamweaver API Reference CS5 User Manual
Page 199

194
DREAMWEAVER API REFERENCE
Workspace
Last updated 8/27/2013
A Boolean:
true
to apply the filter selected in the Related Files bar to the result. Use
false
to get all the related files of
the document. This argument is optional. The default value is
false
.
type
An optional string that represents the type of the related files. It can be an empty string or a string with one of the
following values:
•
SOURCE_HTML
- Retrieves the source HTML document, which is the top most document.
•
GENERATED_HTML
- Retrieves the live generated HTML document. This option is applicable only when the Live
Code feature is enabled.
•
CHILD_DOC
- Retrieves the list of static path related documents.
•
PROCESSED_CHILD_DOC
- Retrieves the list of related documents processed by the server. This option is applicable
only if the dynamically-related files have been discovered and the server generated result references the child
documents that were not already found as static path related documents when opening the document.
•
LIVE_VIEW_CHILD
- Retrieves the list of Live View related child documents. This option is applicable only when
the document is opened in Live View and the server generated source references the child documents that were not
already found as static path related documents when opening the document
•
LIVE_VIEW_XHR_CHILD
- Retrieves the list of Live View referenced resource documents. This option is applicable
only when the document is opened in Live View.
•
DYNAMIC_PATH_CHILD_DOC
- Retrieves the list of dynamic path related files. This option is applicable only if the
dynamically-related files have been discovered and the dynamic related child documents were found in the
discovery process.
•
USER_DEFINED_CHILD_DOC
- Retrieves the list of user defined dynamic path related files. This option is applicable
only when an extension has added user defined related files after calling the
addRelatedFile()
function. For more
information on the
addRelatedFile()
•
ALL_TYPES
- Retrieves all the related files. This is the default value.
Returns
An array of related file objects. Each object has the following properties:
•
uri
- A
DWUri
object representing the URI of the related document.
•
type
- A string of one of the types mentioned in the Arguments section and also an UNKNOWN_TYPE if the type
is not known.
•
document
- A document object of the related document. If there is no related document, this property will be NULL.
•
isChildDocType
- A Boolean value. True, if the related document is a child document (not the source or the
generated source document).
•
isSelectedDoc
- A Boolean value. True, if the document is selected.
document.addRelatedFile()
Availability
Dreamweaver CS5.
Description
This function is used to add an extension-defined related file.