![]() |
![]() |
![]() |
|
![]() |
|||
![]() |
|||
![]() |
GoLive 6 Dynamic Content Samples | ||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||
Main View | Administration View | How it Works | ||||||
![]() |
||||||||
![]() |
|
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 SourcesThe Topics page contains a single content source, Topics, using custom SQL to generate a list of topics from the messages. The SQL looks like this:
The "Count(1)" element computes a record count into a field MessageCount. "Max(MessageDate) AS LastPost" computes the latest date and makes that available as a field LastPost. The GROUP BY clause collapses the records sharing the same topic together. AThe 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. BThe topic number is simply the record number. This special binding is available at the bottom of the field list when you bind an element. CClicking 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 PHP:
The expression in the angle brackets is the PHP syntax for splicing a value into the URL; if the current topic is 'cool stuff', then the final URL is 'messages.php?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. DThe message count is a simple text binding. EThe date of the last post is formatted with the Format Date and Time filter. FThe 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. GThe 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. |