To create a custom record counter for a page, you must first create a recordset for the page, an appropriate page layout to contain the dynamic content, and a recordset navigation bar. To learn more about creating these elements and adding them to a page, see Record counters. After you have created the above elements in the page, you can create a custom record counter.
This example creates a record counter that will appear similar to that created in the previous section, Creating a record counter using the Recordset Navigation Status object. The record counter in this example will appear as follows:
Displaying records StartRow
thru EndRow
of RecordSet.RecordCount
.
In this example, the text in sans-serif font represents the record count placeholders that will be inserted in the page.
Displaying records thru of .
Displaying records thru of {Recordset1.RecordCount}.
records
, and select the Display Starting Record Count Number from the Server Behaviors > Plus (+) button > Record Count panel. The text string should now appear as:
Displaying records{StartRow_Recordset1}
thru of{Recordset1.RecordCount}
.
thru
and of
, and select the Display Starting Record Count Number from the Server Behaviors > Plus (+) button > Record Count panel. The text string should now appear as:
Displaying records{StartRow_Recordset1}
thru{EndRow_Recordset1}
of{Recordset1.RecordCount}
.
Displaying records 1 thru 8 of 40.
If the results page has a navigation link to move to the next set of records, clicking the link would update the record counter to read as follows:
Showing records 9 thru 16 of 40.
Links dont work in the Live Data window. To test them, you can use the Preview in Browser feature in Dreamweaver. Make sure the Preview Using Live Data Server option is selected in Preferences (Edit > Preferences > Preview in Browser (Windows) or Dreamweaver > Preferences > Preview in Browser (Macintosh)); then select File > Preview in Browser.