decorative banner

Understanding block navigation


    Pages can display blocks or groups of records of a large record set. For example, if you do a Web search using a search engine or search for products in a catalog, you usually get a results page that shows 5 or 10 results per page. There are navigation buttons that let you move to the next or previous page. There are also links that let you move to pages other than the immediate next or previous page. This is called block navigation where you can move to any page showing a particular block of records.

    Block navigation in GoLive works by defining a second content source that returns block information about a specific content source. You first define your search results content source and then define a block navigation content source that refers to it. The block navigation content source returns one record for each block. For example, if your search results content source has 34 records in it and 10 records are displayed on each results page, then the block navigation content source would have 4 records. The fields of each block navigation record are:

    • First: the record number of the first result record in this block
    • Last: the record number of the last result record in this block
    • Block_Size: the number of result records in this block
    • Link_URL: an HTML HREF link to the result page with content source positioning information so the first record in this block will be displayed
    • Link_URL_checker: returns the empty string if the current block contains the current record of the main content source. Use with conditional regions to show a link only for blocks other than the current block.
    • Total_Records: the number of result records in this block

    The block or page number of the block is obtained using the [Record Number] field of the block navigation content source.

To add block navigation to a search results page:

  1. Set up the results page to show the block of results. Add the content source to the page. Create a table showing the results. Set the table to show your choice of records per block in the Dynamic Bindings palette.
  2. Add another content source to the page. This must appear to the right of the content source that supplies the search results. It is helpful to give this content source a name similar to the name of the content source supplying the search results. For example, if the content source supplying the results is results, name this content source results_navigation.
  3. Set the type of this content source to Navigation Block View in the Inspector.
  4. Set the Content Source field in the Navigation content source to be the name of the content source supplying the results.
  5. On the page add a table with one row to contain the links to the blocks. Type some placeholder text in the first cell. For example, put the numbers 1, 2, 3, and so on as placeholder text in the cells of the row. Format the table as you would like it to appear on the page.
  6. With the table selected, use the Dynamic Bindings palette to set the Repeat Cells option, and set the content source to the block navigation content source.
  7. Select the text in the first cell of the table, and link it to the current page.
  8. In the Dynamic Bindings palette, bind the link text to the block navigation content source and [Record Number] field.
  9. In the Dynamic Bindings palette, bind the link destination to the block navigation content source and Link_URL field.
  10. This fills the table with links of the format 1 2 3 4 5 representing page numbers. If you want record ranges such as 1-10, 11-20, 21-30, 31-34 in the last two steps, type placeholder text in the format 1-10, bind the text 1 to the field First, bind the text 10 to the field Last, and select 1-10 and bind the link destination to Link_URL.