Webmastersite.net

Search    Register    Log In   

Details

Refreshless monthly listings and "load more" button
By
Mar 17, 2019 at 10:03 PM

After adding the refreshless toplist pagination option, I got to thinking about other ways/places refreshless loading of content could be useful.

First up was the listings this month calendar widget. It's not in the standard templates, but it's in the blog theme in use here. Checking previous and future months was a pain because the whole page would have to reload and you'd have to scroll back down to where the calendar widget is, and also the URL would be cluttered with a bunch of parameters. Now with the refreshless option, switching months is smooth and nearly instantaneous. To use, just change your {FUNC_LISTINGSTHISMONTH} to {FUNC_LISTINGSTHISMONTH[ajax]}. Pondering putting some form of this into the admin panel templates, maybe on the admin search page.

Next, I thought about situations where you don't actually want to switch pages -- you just want more content to show up on the page while leaving the previous content where it was. Basically a "Load More" button as you'll often find on news sites. It's also useful for a blog like this one, because you don't really care to go to a particular page of blog listings, you just want to see more. I've added this to the toplist generator options, and you can retrofit it into an existing toplist with {TOPLIST1AJAXLOADMORE} (where 1 is replaced by your toplist number).

I've implemented both of these new options on this blog, so you can see them on the front page here.

Another change in today's 10.4.8 Beta 2 is I've added a X-Robots-Tag: noindex HTTP header to ajax.php to stop google webmaster tools from reporting crawl issues with it.




Views 28 views. Averaging 1 view per day.
Similar Listings
Saved Listings Changes
jQuery and Saved Listings
Adding Listings from Bing

Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Please login or register.