Littled Library Pagination

From Littledamien Wiki
Revision as of 15:44, 13 September 2014 by Video8 (talk | contribs) (→‎Toggling galleries within album listings)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Pagination[edit]

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[edit]

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.

Refreshing listings after AJAX edits[edit]

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[edit]

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[edit]

  • .gallery-listings element
  • PHP template
    • (CMS_COMMON_TEMPLATE_DIR)_content/albums/gallery_listings_container.php
    • album id: $album->id->value
    • content type id: $filters->gallery->site_section->id->value