![]() |
![]() |
![]() |
|
![]() |
|||
![]() |
|||
![]() |
GoLive 6 Dynamic Content Samples | ||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||
Main View | Administration View | How it Works | ||||||
![]() |
||||||||
![]() |
|
A. Dynamic table displaying the sorted list of stories. C. Story title and link to editing page. B. Story author and status. D. Clickable column titles to sort table. Content SourcesList Stories uses the Stories table from the Stories database. The page is designed so that when a user clicks on one of the column titles, it sorts the table based on that column. In order to do this, the SQL is a custom query. Here is what it looks like in GoLive:
This expression sorts the Stories based on a SortBy parameter in the URL. A link that refers to this page should look like list.php?SortBy=Title. The pageParameter() function is part of the code GoLive installs in the site. It returns the value of the SortBy parameter in the URL; if there is no SortBy parameter, it returns the value "Title". This construction is safer than matching directly against a URL parameter, because it works even if the source link forgets to include a value for SortBy. Notice the curly braces in the SQL expression. When typing custom SQL, GoLive treats anything between curly braces as code that it should evaluate and splice into the query. A.The dynamic table is bound to the Stories content source. GoLive treats the first row as a header row since it contains no dynamic content. B.The title text displays a story's title. It is also a link that uses Show Details of Current Record so that a user can click on a title to edit that story. C.Author and status are simple bindings to display information about a story. D.Clicking on one of the column titles sorts the table based on the column. The column titles are all static links that point back to the current page, but with different values for the SortBy parameter. The author heading, for example, links to list.php?SortBy=Author. |