Littled Library Pagination: Difference between revisions
| Line 38: | Line 38: | ||
== Album and gallery containers == | == Album and gallery containers == | ||
See also [[Album/Gallery Listings]] | |||
The default album listings container is `.album-listings` and the default gallery listings container is `.gallery-listings`. Whatever routine calls the listings, formDialog, or resort libraries will override the default listings selector with the appropriate values. | The default album listings container is `.album-listings` and the default gallery listings container is `.gallery-listings`. Whatever routine calls the listings, formDialog, or resort libraries will override the default listings selector with the appropriate values. | ||
Revision as of 15:35, 13 September 2014
Pagination
littled/listings.js
Listings container is stored in dom.listings_container, with a default value of '.listings'.
The page key is defined in keys.page, with a default value of 'p'.
When clicking on page buttons to navigate to a different page in the listings, the new page value comes from the page button itself.
Resorting
littled/resort.js
Listings container is stored in dom.listings_container, with a default value of '.listings'.
The position_offset key is defined in keys.position_offset, with a default value of 'po'. This is the position of the first record currently being displayed on a page relative to the first record in the entire set of matching listings.
When loading modal dialogs and refreshing listings content, the library looks to the data-po attribute of .listings table:first by default.
Typically the `<table> markup is in a page content template, which is wrapped in a div.listings` container by the top-level page.
- See also Sorting Listings
Refreshing listings after AJAX edits
littled/formDialog.js
Listings container is stored in dom.listings_container, with a default value of '.listings'.
The page key is defined in keys.page, with a default value of 'p'.
When loading modal dialogs and refreshing listings content, the library looks to the data-p attribute of .listings table:first by default.
Typically the `<table> markup is in a page content template, which is wrapped in a div.listings` container by the top-level page.
Album and gallery containers
See also Album/Gallery Listings
The default album listings container is .album-listings and the default gallery listings container is .gallery-listings. Whatever routine calls the listings, formDialog, or resort libraries will override the default listings selector with the appropriate values.
The libraries will still look to the first table element in the container for the page' and position offset values.
Toggling galleries within album listings
.gallery-listingselementdata-pidalbum iddata-tidcontent identifier for the gallery, as defined by the Content Properties CMS
- PHP template
(CMS_COMMON_TEMPLATE_DIR)_content/albums/gallery_listings_container.php- album id:
$filters->gallery->album_id->value - content type id:
$filters->gallery->site_section->id->value