Adobe
GoLive 6 Dynamic Content Samples
Overview
Database Design
Contact Sheet
Medium Image
Large Image
Edit Album
Confirm Deletion

text

A. Template photo. B. Repeated content to display all the photos. C. Mock content.

Content Sources

Contact Sheet uses the Photos query in the Photos database. All of the work in filtering records is already taken care of by the database design.

Since all of the Main View pages use Show Details of Current Record, it is important that they all use the same name for the Photos content source. Show Details of Current Record only works when a content source has the same name on the source and destination pages.

With some databases and database queries, GoLive cannot automatically determine the primary key that allows it to uniquely identify records. This is the case with the Photos query. All of GoLive's features continue to work without this information, but they are a little less efficient. If you want, you can add the primary key information manually in source mode. Using ASP the content source for the Photos query looks like this:

set Photos = ADORecordSet("album", "select * from Photos", "block=0", "ID", "Photos")

The primary key is the second to last argument, 'ID'. If you know that your query has a primary key and you see that this argument is blank, you can type in the primary key by hand. The syntax is a comma separated list of field names.

A.

The template image is bound to Photos.Small, which is the filename for the image thumbnail. The image alt text is bound to the photo caption, and the image link uses Show Details of Current Record so that when a user clicks on the image he sees the medium size version.

The image is not a fixed height or width, because not all of the thumbnails on the page are the same size.

B.

The Repeat Content container repeats the template for every image. The design uses Repeat Content rather than a dynamic table so that the thumbnails flow based on the size of the user's browser window.

C.

Unlike with a dynamic table, there is no way for a Repeat Content block to automatically recognize mock content. If you still want to design with it, you can include custom code that removes the mock content when the page runs. The resulting page is just as efficient as if there were no mock content.

The technique is to wrap the mock content in a conditional display block that never displays. In ASP that code looks like this:

<% if 0 %>
...
<% end if %>

If you look at contact_sheet.asp in layout or source view, you can see the custom code blocks at the beginning and end of the mock content. It is also possible to remove mock content by using a Hide Content container.