Adobe
GoLive 6 Dynamic Content Samples
Overview
Database Design
Products
Shopping Cart
Shipping Address
Billing Address
Place Order
Thanks
Edit Promotions
Edit Products

text

A. Record number and count. B. Link for creating a new product. C. Navigation links for moving between products. D. Text fields for editing product name and tagline. E. Text area for editing description. F. Text fields for editing current and regular price. G. Dynamic pulldown menu for setting product promotion. H. Text field and image for setting image. I. Form submission buttons.

Content Sources

There are two content sources. The ProductData table is used to edit and display the product information. The Promotions table is used to dynamically construct the promotions menu. If the user arrives at this page by clicking a product on the Edit Promotions page, or by using the previous and next links at the top of the page, then the ProductData content source automatically selects the appropriate product. Otherwise it just selects the first product.

A

The record number and count indicate which product is being displayed and how many products are in the database. These special bindings are available at the bottom of the field list when you bind an element.

B

The link to create a new product uses Show Details of Empty Record. When the user clicks on this link, the form displays a new record so that the user can add a product to the database. Nothing is really added until the user enters the product information and clicks the update button, so it is easy to cancel the action.

C

The navigation links are created using the appropriate Link Actions in the Dynamic Bindings palette. GoLive automatically sets the link href to be the current page.

D

The text inputs for name and tagline are bound in the same way as ordinary text.

E

A product's description can include arbitrary HTML and CSS, so the text area to edit it uses the Encode String as HTML filter. This filter make sure that special HTML characters like '<' are handled correctly. It is a good idea to always use Encode String as HTML with any text area control.

F

The text inputs for the regular and current prices are simple bindings. There is no way to apply a filter to a text input, so if you want a currency symbol you need to put one in by hand in front of the text input.

G

The promotion menu works the same way as the one on the Edit Promotions page. See the description on that page for more details.

H

The text input and image are both bound to ProductData.ProductImage. The text input shows the URL as a text string; the image shows it as an image.

I

The two form buttons have Form Actions selected from the Dynamic Bindings palette. GoLive automatically targets the correct page in the config/actions folder to perform the indicated actions, in this case either updating a product or deleting it.