Littled Library Pagination: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
 
 
(3 intermediate revisions by the same user not shown)
Line 22: Line 22:


Typically the `<nowiki><table></nowiki>` markup is in a page content template, which is wrapped in a `div.listings` container by the top-level page.
Typically the `<nowiki><table></nowiki>` 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 ==
== Refreshing listings after AJAX edits ==
Line 36: 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.  


The libraries will still look to the first table element in the container for the ''page''' and '''position offset''' 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-listings` element
** `data-pid` album id
** `data-tid` content identifier for the gallery, as defined by the [[Littled_Content_Properties_CMS|Content Properties CMS]]
* 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`

Latest revision as of 15:44, 13 September 2014


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