Adobe 38040334 - Dreamweaver CS3 User Manual page 348

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

The
string specifies a regular expression that you can check. The array should contain the same number
6
regExps
of
elements as are specified in
regExps
the document's source code before the translator can act on a file.
The
string specifies when this translator executes. The following list gives the possible string values:
7
runDefault
String
Definition
"
"
Sets the translator to always execute.
allFiles
"
"
Sets the translator to never execute.
noFiles
"
byExtension
"
Sets the translator to execute for files that have one of the file extensions that are specified in the extension.
"
"
Sets the translator to execute if the document contains a match for one of the specified regular expressions.
byExpression
"
"
Sets the translator to execute if the document contains a match for one of the specified strings.
bystring
Note: If you set
runDefault
as setting
. If you set
"allFiles"
effect is the same as setting
The
string specifies the default priority for running this translator. The priority is a number between
8
priority
and
. If you do not specify a priority, the default priority is
100
When multiple translators apply to a document, this setting controls the order in which the translators are applied.
The highest priority is applied first. When multiple translators have the same priority, they are applied in alphabetical
order by
translatorClass
Example
The following instance of the
includes:
function getTranslatorInfo(){
var transArray = new Array(11);
transArray[0] = "SSI";
transArray[1] = "Server-Side Includes";
transArray[2] = "4";
transArray[3] = "htm";
transArray[4] = "stm";
transArray[5] = "html";
transArray[6] = "shtml";
transArray[7] = "2";
transArray[8] = "<!--#include file";
transArray[9] = "<!--#include virtual";
transArray[10] = "byExtension";
transArray[11] = "50";
return transArray;
}
translateDOM()
Availability
Dreamweaver CS3.
, and at least one of the
nRegExps
to
but do not specify any extensions (see step 4.), the effect is the same
"byExtension"
to
runDefault
"byExpression"
.
"noFiles"
.
getTranslatorInfo()
regExps
but do not specify any expressions (see step 6.), the
. The highest priority is
100
function gives information about a translator for server-side
DREAMWEAVER CS3
Extending Dreamweaver
elements must match a piece of
, and
is the lowest.
0
100
342
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents