NavStart
CDBResult::NavStart( int page_size=10, bool show_all=true )
The method splits the result of retrieved selection into pages.
To embed the automatic pagewise navigation system, you have to first call the CDBResult::NavStart method. After it is called, this scope of methods
will be limited only to the current page (and not to the complete selection). To display the pagewise navigation links, you must use CDBResult::NavPrint method.Non-static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
page_size | Page size (from 1 and more). Optional; by default 10. | |
show_all | Permits to show all records (and show the "All" link in the navigation bar). Optional. By default - "true". | |
NumPage | (disregarding the parameters passed on the URL). Optional; false by default (display as is).Forces the display of the page with the specified number (disregarding parameters passed into URL). Optional. By default - "false" (display automatically). | Deprecated from 3.0.11 |
See also
- CDBResult::NavNext
- CDBResult::NavPrint
- CDBResult::IsNavPrint
- CDBResult::Fetch
- CDBResult::GetNext
- CDBResult::ExtractFields
Examples of use
<? $rsBanners = CAdvBanner::GetList($by, $order, $arFilter, $is_filtered); $rsBanners->NavStart(20); echo $rsBanners->NavPrint("Banners"); while($rsBanners->NavNext(true, "f_")): echo "[".$f_ID."] ".$f_NAME."<br>"; endwhile; echo $rsBanners->NavPrint("Banners"); ?>
© «Bitrix24», 2001-2024