Document library controls
Document Library ProĀ comes with various elements that can be displayed aboveĀ or below the table. These make it easier for usersĀ to search, sort and filterĀ the table. These elements are:
- Search box ā the keyword search box at the top right of the table.
- Page length ā the āShow <x> entriesā select box above the table.
- Totals ā the total number of documentsĀ text displayed below the table (e.g. āShowing 1 to 10 of 50 entriesā).
- PaginationĀ - the paging options that appear below a multi-page table.
- Reset button ā the āResetā link next to the search box whichĀ removes the current search/filters.
- Footer ā an optional row at the bottom of the table where you can repeat the column headings
- Scroll offsetĀ - if you have a sticky header, you can also change where the table reloads so that the top isn't hidden behind the sticky header
DisplayĀ searchĀ box
The search_box
option controls whether to display the search box for filtering the table by keyword, and where it should appear. Defaults to top
. Choose from one of the following options:
top
ā show search box above the table (top-right)bottom
ā show below the table (bottom-right)both
- show above and below the tablefalse
ā hide the search box
Example: [doc_library search_box="bottom"]
DisplayĀ pageĀ length
Table layout only
The page_length
option controls whether to display the āShow <x> entriesā drop-down menu, and whether to display it above or below your table. Defaults to top
. Choose from one of the following options:
top
ā show page length above the table (top-left)bottom
ā show it below the table (bottom-left)both
- show above and below the tablefalse
ā hide the page length drop-down
Example: [doc_library page_length="false"]
Display totals
The totals
option controls whether to display the total number of documents in the tableĀ (e.g. āShowing 1 to 10 of 50 entriesā), and where to display it. Defaults to bottom
. Choose from one of the following:
top
ā show above the table (top-left)bottom
ā show below the table (bottom-left)both
- show above and below the tablefalse
ā hide the item totals
Example:Ā [doc_library totals="top"]
Display pagination
The pagination option controls whether to display the pagination buttons for scrolling between the results, and where to display them. Defaults to bottom
. Choose from one of the following:
top
ā show above the table (top-right)bottom
ā show below the table (bottom-right)both
- show above and below the tablefalse
ā hide the pagination buttons
Example:Ā [doc_library pagination="false"]
Paging type
The paging_type
option controls the style of pagination used for your document library. Choose between 5 pagination styles:
numbers
ā page numbers onlysimple
ā āPreviousā and āNextā onlysimple_numbers
āĀ āPreviousā and āNextā buttons, plus page numbers (the default)full
āĀ āFirstā, āPreviousā, āNextā and āLastā buttonsfull_numbers
āĀ āFirstā, āPreviousā, āNextā and āLastā buttons, plus page numbers
Example: [doc_library paging_type="full_numbers"]
ResetĀ button
The reset_button
option controls whether to display the āResetā button above the table. Defaults to true
. Set reset_button
to false
to hide the button.
Example:[doc_library reset_button="false"]
Show footer
Table layout only
The show_footer
option lets you show the column headings at the bottom of the table as well as the top. The default is false
(i.e. hide the footer headings), but you can set this to true
to show them.
Example: [doc_library show_footer="true"]
Scroll offset
Table layout only
When paging between multiple pages of results in your table, Document Library Pro will automatically ājumpā back to the top each time. This is particularly useful if you are displaying a large number of rows on each page. Document Library Pro attempts to scroll to the correct position on the page but sometimes it doesnāt quite calculate this correctly. This is because each website and WordPress theme is different and some can have features which interfere with the scroll position ā e.g. sticky navigation menus.
The scroll_offset
option lets you override the scroll amount or disable this behavior altogether. The default scroll amount is 15
. If you find that the top of your table is āchopped offā when moving between pages, try increasing this to a larger number (e.g. scroll_offset="50"
). If youād like to disable automatic scrolling, set this option to false
.
Example: [doc_libraryĀ scroll_offset="35"]