Adobe
GoLive 6 Dynamic Content Samples
Overview
Database Design
Browse
Catalog Item
Find Items
Edit Item

text

A. Dynamic table of catalog sections. B. Link to display the products in a section. C. Current section. D. Product thumbnail. E. Product name. F. Product price. G. Dynamic table of products in current section. H. Navigation links.

Content Sources

The browse page contains two content sources: one to display the table of contents of section names, and one to display the products in the current section. The Sections content source is straightforward; it is simply the Sections table from the Catalog database.

The Products content source is more elaborate. It uses record filtering to limit the products to those in the current section, which is determined by a URL parameter.  Here is what the content source looks like in GoLive:

text

If the URL for the page is 'browse.asp?SectionName=Europe', then the Match Pattern limits the records to those for which SectionName is 'Europe'. This predefined Match Pattern is available from the flyout menu when you enter a Match Pattern. It is convenient, because GoLive takes care of figuring out the correct SQL code to splice the URL parameter into the query.

One downside of using the predefined Match Pattern is that a link to browse.asp will break if it leaves off the SectionName parameter. The List Stories page in the Stories sample illustrates an alternative design that can provide a default parameter value. The Stories design is more complicated, but more robust.

A.

The table of contents on the left is bound to the Sections content source.

B.

Each row in the table of contents is a link to display the products in a section. The link text is bound to Sections.Name so that it shows the name of the section. Rather than using any of the dynamic Link Actions, the link explicitly passes a value for SectionName. Here is what the link code looks like in ASP:

browse.asp?SectionName=<%=Sections.Name%>

Notice that the value for SectionName is the name displayed in the current row of the table of contents. The easiest way to create links like this is to use the 'Edit..." flyout menu in GoLive's link inspector. This middle part of the edit dialog allows you to add query parameters that have dynamic values. GoLive figures out the correct code based on your scripting language.

There is no way to implement this kind of navigation link using Show Details of Current Record, for two reasons. First, Show Details of Current Record always displays a single record, and in this case we want to displays all of the records in a catalog section. Second, Show Details always works within a single content source. Here we want to use information from one content source, Sections, to affect the records in a different content source, Products.

C.

The section name text is bound to Products.SectionName. Since all of the products on the page are in the same section, we can display the section name of any of them to indicate the current section.

D.

The template thumbnail is bound to Products.SmallImage. It is a link that uses Show Details of Current Record to display the product's details on the Catalog Item page.

E.

The product name is a simple text binding.

F.

The product price uses the Format Currency text filter to display the price in whole dollars.

G.

The dynamic product table uses Repeat Cells to display products going across the page. In order to get a fixed 2x3 layout, it uses the Maximum Cells per Row and Maximum Rows per Page options.

H.

The previous and next links use the appropriate navigation Link Actions. These actions work correctly regardless of whether a page displays a single record or a dynamic table or records.