For a better management of your gallery, follow the next steps in order to create a list with all your images:
Open the \admin\list_img page.
Create a recordset A recordset is the result of executing an SQL query. It is composed of multiple rows, each row having multiple columns. The columns presented in the query result depend on the column list declared in the query (they can belong to different tables). The number of rows and their order depend on the query conditions (WHERE, GROUP BY, HAVING, ORDER). The recordset acts as a source of dynamic data The InterAKT Dynamic Data tool is a replacement for the standard dynamic data dialog. It is used in the MX Kollection 3, to provide a unified way of building mark-ups, or place holders. These are recordset fields, server or session variables, and other types of dynamic data that are replaced at runtime by their corresponding values in web applications. that retrieves data from the image_img database A database refers to data organized and stored on a computer that can be searched and retrieved by a computer program. Most industrial-strength and many smaller database applications can be addressed using SQL (Structured Query Language). table.
· Click on the Plus (+) button of the Bindings tab. If the Bindings tab is not visible, open it from Window -> Bindings.
· From the pop-up menu that appears, select Recordset (Query A query is a SQL command that will extract information from the tables of a database. Essentially, a query is a request for information from your database.). This will open the Recordset dialog window.
· Name the recordset rsImages.
· Select the database Connection (connGallery) and the Table that stores images (image_img).
· Sort the images by date in descending order to list the most recent images first.
List all images using a dynamic table (Insert bar -> Application -> Dynamic Table):
Configure the dynamic table as seen in the following image:
Trim the generated table as follows:
· Delete the first column containing the primary key A primary key is one or more table columns whose values uniquely identify each record in a table. In general, a primary key is defined on a single column, but it is not uncommon to have it defined on two columns..
· Change the column headings to something more meaningful.
· Remove the dynamic text labeled as rsImages.filename_img. You will replace this later with an actual preview of the image (an image thumbnail).
Your table should look like this by now:
In the empty cell, below insert a thumbnail view of the image, by applying the Show Thumbnail server behavior A server behavior is a reusable component for server-side development. They add blocks of code to your pages for accomplishing specific tasks. Dreamweaver comes with several default server behaviors and the InterAKT extensions add many more to this list. (Application panel -> Server Behaviors -> + -> MX Kollection -> File Upload -> Show Thumbnail).
The Show Thumbnail icon will look like in the following image in your Dreamweaver Design View:
Save your page and preview it in the browser:
You have created the image list for managing your photos. In the next topic you will learn how to delete images from your gallery.