Editing
JQuery Initialization on Listings Pages
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Pagination=== ====Content CMS==== * Specify a listings handler script with the "listings uri" setting. * Default handler is <code>/hostmgr/_ajax/utils/listings.php</code> ** Default handler requires that the content and filters objects for that type of content have been defined within the local <code>cache_class</code>. ====HTML==== <syntaxhighlight lang="php"> <table id="listings-table" data-tid="<?=$filters->site_section->id->value?>" data-p="<?=$filters->calc_rec_position()?>"> </syntaxhighlight> * The listings container is a table. * Attributes of <code>table</code> element: ** <code>id</code> default value <code>#listings-table</code>. Used as jQuery selector for paging functionality. ** <code>data-tid</code> content type contained within table. Used to retrieve paging content. ** <code>data-p</code> Index of the first record on the page. E.g. on the 2nd page with 50 records per page the value would be 51. ====PHP==== <syntaxhighlight lang="php"> include (COMMON_TEMPLATE_DIR."framework/navigation/listings_page_links.php"); </syntaxhighlight> * This include is placed outside the <code>table id="listings-table"</code>element and inside the <code>div id="listings-container"</code> element. * Upldate local <code>cache_class</code> to support the content type. See [[Adding Content Types to the Local Cache Class]] ====JavaScript/jQuery/AJAX====
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information