Dreamweaver CS4 Resources
|
Use predefined data formats
Dreamweaver includes
several predefined data formats that you can apply to dynamic data
elements. The data format styles include date and time, currency, numerical,
and percentage formats.
Apply data formats to dynamic content- Select the dynamic content in either
the Live Data window or its placeholder in the Document window.
- Select Window > Bindings to display the Bindings
panel.
- Click the down arrow button in the Format column.
If the down arrow is not visible, expand the panel.
- From the Format pop‑up menu, select the data format category
you want.
Ensure that the data format is appropriate for the type
of data you are formatting. For example, the Currency formats work
only if the dynamic data consists of numerical data. Note that you
cannot apply more than one format to the same data.
- Verify that the format was applied correctly by previewing
the page in either the Live Data window or a browser.
Customize a data format- Open a page that contains dynamic data
in Design view.
- Select the dynamic data whose format you want to customize.
The bound data item whose dynamic text you selected is
highlighted in the Bindings panel (Window > Bindings).
The panel displays two columns for the selected item—Binding and
Format. If the Format column is not visible, widen the Bindings
panel to reveal it.
- In the Bindings panel, click the down arrow in the Format
column to expand the pop‑up menu of available data formats.
If the down arrow is not visible, widen the Bindings panel
more.
- Select Edit Format List from the pop‑up menu.
- Complete the dialog box, and click OK.
- Select the format from the list, and click
Edit.
- Change any of the following parameters in the Currency,
Number, or Percent dialog boxes, and click OK.
The number of digits to display after the decimal
point
Whether to place a leading zero in front of fractions
Whether to use parentheses or a minus sign for negative values
Whether to group digits
- To delete a data format, click the format in the list,
and click the Minus (-) button.
Create a data format (ASP only)- Open a page containing dynamic data
in Design view.
- Select the dynamic data you want to create a custom format
for.
- Select Window > Bindings to display the Bindings
panel, and click the down arrow in the Format column. If the down
arrow is not visible, expand the panel.
- Select Edit Format List from the pop‑up menu.
- Click the Plus (+) button, and select a format type.
- Define the format, and click OK.
- Enter a name for the new format in the Name column, and
click OK.
Note: Though Dreamweaver only supports
creating data formats for ASP pages, ColdFusion and PHP users can
download formats that other developers created, or create server
formats and post them to the Dreamweaver Exchange.
For more information on the Server Format API, see Extending Dreamweaver
(Help > Extending Dreamweaver > Server Formats).
|