
380
DREAMWEAVER API REFERENCE
Design
Last updated 8/27/2013
• “create_and_import" - write CSS in cssFileName and import.
• cssFileName is the name of the CSS file to link or import and create, if appropriate.
• preventOverwrite is a Boolean value, where: true: when creating a new CSS file, fail if the file already exists false:
overwrite the file if it already exists
Returns
A Boolean value: true: layout is successfully applied; false: otherwise.
Example
dw.getLayoutNames();
var theDOM = dw.getDocumentDOM();
alert (theDOM.canApplyLayout());
if (theDOM.canApplyLayout())
theDOM.applyLayout(1, "embed");
else
alert("can't apply layout to this doc");
dom.canApplyLayout()
Availability
Dreamweaver CS3.
Description
Checks whether a CSS-based layout can be applied to the document. It checks that the document body is empty, and
that it is a page where you can apply a layout. That is:
• A page that is basically HTML based, such as HTML, XHTML, ColdFusion, PHP, and so on (but not CSS, XML,
JavaScript, and so on).
• A page that is not a frameset or a template instance (although a template itself is fine). evelyn
Arguments
None.
Returns
A Boolean where: true: layout can be applied. false: layout cannot be applied.
dw.getFilesForLayout()
Availability
Dreamweaver CS3.
Description
Gets the paths of the configuration files for the specified layout.
Komentarze do niniejszej Instrukcji