![]() |
![]() |
![]() |
|
![]() |
|||
![]() |
|||
![]() |
GoLive 6 Dynamic Content Samples | ||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||
Main View | Administration View | How it Works | ||||||
![]() |
||||||||
![]() |
|
A. Form controls for specifying a search pattern. B. Dynamic pulldown menu of section names. C. Search button. D. Link to create a new product. Content SourcesThere is very little on the Find Items page that is dynamic. In fact, the only reason there is a content source is to dynamically construct the pulldown menu of section names. The content source uses custom SQL to include a blank line with the rest of the section names. Here is the SQL query:
The UNION keyword merges the records from the Sections table and the BlankSection table; the BlankSection table has a single, blank entry. See your database documentation for more information about creating union queries like this one. A.The majority of the form controls are not dynamic; they simply have the same names as the corresponding fields in the Products database table. When the user clicks the search button, the resulting URL will have one parameter for each form control: edit.asp?Name=x&SectionName=y&.... The Edit Item page uses record filtering to find the products that match these parameters. B.The pulldown menu is dynamically constructed from the section names. There is one menu option for each section, and an extra option for the blank entry in BlankSection. To dynamically construct a pulldown menu you use the Construct Dynamically portion of the Dynamic Bindings palette. There are three different text boxes: one to specify where to get the list of options, one to specify the field in that list that has the labels a user sees, and one to specify the field that has the option values. In this example the labels and values both use the Name field from the union query. C.Clicking the search button submits the form to the Edit Item page. D.There are several ways to implement the link that creates a new product. The usual design is to use Show Details of Empty Record, but since there is no Products content source on this page, it is just as simple to mimic its effect with a custom link parameter. The syntax is the same for every scripting language:
This idiom tells GoLive to display a blank record for the Products content source on edit.asp. You can reuse this code with a different page by simply changing 'Products' to the name of the content source on your page. The code is identical to the code that Show Details of Empty Record uses. |