Adobe
GoLive 6 Dynamic Content Samples
Overview
Database Design
Topics
Messages
Create Topic
Manage Topics
Manage Messages
Delete Topic
Delete Message

text

A. Dynamic table to display message topics. B. Topic number. C. Topic name. D. Number of messages. E. Date of last post. F. First, last, and total number of topics. G. Navigation links.

Content Sources

The Topics page contains a single content source, the Topics query from the User Forum database. The page sorts the topics by name.

A

The dynamic table displays the available topics. It uses Records per Page to show the topics eight at a time. Notice that the table begins with the row that contains the column labels and ends with the last white row; the top and bottom rows are in separate tables. The reason is that if the row with the previous and next links were part of the dynamic table, GoLive would treat it as the template row. Similarly, it treats anything below the template row as mock content, so it would discard the footer that has the link to create a new topic.

B

The topic number is simply the record number. This special binding is available at the bottom of the field list when you bind an element.

C

Clicking on the topic title displays the topic's messages. To do this, the link includes the current topic as a dynamic URL parameter. Here is what the link looks like in ASP:

messages.asp?Topic=<%=Topics.Value("Topic")%>

The expression in the angle brackets is the ASP syntax for splicing a value into the URL; if the current topic is 'cool stuff', then the final URL is 'messages.asp?Topic=cool stuff'. The easiest way to add a dynamic parameter like this is to use the 'Edit...' flyout in GoLive's link inspector. In this case the parameter name is 'Topic', and the value is 'Topics/Topic' from the flyout menu.

D

The message count is a simple text binding.

E

The date of the last post is formatted with the Format Date and Time filter so that it shows up as MM/DD/YY. In ASP the format depends on the localization settings of the Web server's operating system, so the format is correct for the host country.

F

The first record on the page, last record on the page, and the total number of records are special bindings that are available at the bottom of the field list when you bind an element.

G

The navigation links use the appropriate Link Actions in the Dynamic Bindings palette. These Link Actions work correctly regardless of whether a page displays a single record or a table of records.