
How data formatting works 401
The following example shows the format tag for the "Currency - default" string:
<format file="Currency" title="Currency - default" ¬
expression="<%\s*=\s*FormatCurrency\(.*, -1, -2, -2, -2\)\s*%>|¬
<%\s*=\s*DoCurrency\(.*, -1, -2, -2, -2\)\s*%>"
NumDigitsAfterDecimal=-1 IncludeLeadingDigit=-2 ¬
UseParensForNegativeNumbers=-2 GroupDigits=-2/>
The format type for this format is Currency. The "Currency - default" string appears on
the Format menu. The expression
<%\s*=\s*FormatCurrency\(.*, -1, -2, -2,¬
-2\)\s*%>|<%\s*=\s*DoCurrency\(.*, -1, -2, -2, -2\)\s*%>
finds occurrences of
this format in the user’s document.
The
NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers,
and
GroupDigits parameters are for the Currency format type and are not required. These
parameters appear in the Parameters dialog box for the
Currency format type. The
Parameters dialog box appears when a user selects the
Currency format type from the Plus (+)
menu of the Edit Format List dialog box. The values that are specified for these parameters
define the new format.
The Edit Format List Plus (+) menu
If you do not want a file in the ServerFormats folder to appear in the Edit Format List Plus (+)
menu, add the following statement as the first line of the HTML file:
<!-- MENU-LOCATION=NONE -->
To determine the contents of the menu, Dreamweaver first searches for a ServerFormats.xml
file in the same folder as the data formats (for example, Configuration/ServerFormats/ASP/
ServerFormats.xml). The ServerFormats.xml file describes the contents of the Edit Format
List Plus (+) menu, and it contains references to the HTML files that it lists in the menu.
Dreamweaver checks each referenced HTML file for a title tag. If the file contains a title tag,
the content of the title tag appears in the menu. If the file does not contain a title tag, the
filename is used in the menu.
After Dreamweaver finishes searching for the file, or if the file does not exist, Dreamweaver
scans the rest of the folder to find other items that should appear in the menu. If
Dreamweaver finds files in the main folder that aren’t already in the menu, it adds them. If
subfolders contain files that aren’t already in the menu, Dreamweaver creates a submenu and
adds those files to it.
Comentários a estes Manuais