Ardour Digital - Specialists in development, consultancy, and training for Telligent community and ASP.NET application development

Many widgets in Telligent Community use "endless" or automatic paging, loading the next page of content when the user reaches the bottom of the page. By default the next page of content is loaded when you are 150 pixels from the bottom of the page. If you have a large amount of footer content this means you end up having to scroll past the content a long way before the next page is triggered, this isn't ideal.

You can alter the point the next page is loaded on a widget by widget basis by setting the padding property when the scrollend event is setup, as documented here. I wanted to try and find a way to change this default globally, so that we didn't have to customise the standard widgets.

The first question to answer, was "Is this a good idea?" As always the answer is it depends! If you are using endless scroll in many places on your community, you probably don't want a very large footer, as users will never be able to reach it! Also there is no supported way to do this, so obviously any way of doing this will have some risk associated when doing upgrades. The community in question doesn't use "endless" scrolling, the auto loading is only used on a couple of rarely used pages, which load a limited amount of content, rather than an "endless" amount. These widgets could have been edited manually, but would probably have been better of switching to normal paging rather than the automatic scrolling. With this in mind decided it was worth taking on this approach, but this isn't suitable for all applications, and if the usage of the community changes, would probably switch to normal paging for these pages instead.

The code overrides the standard setup javascript code, and sets the padding to the appropriate size. Our footer is taller on mobile devices, so if the user is on a mobile sized screen we adjust the padding based on that.

This must be added before the setup method is first called, so I placed it at the start of the theme.js file.

As mentioned, this is not necessarily a good idea, so if you want to use it do so with care and beware of it's limitations mentioned above.

Ardour Digital can help you get the most out of Telligent Community. Providing development, training, and advice.

To find out more email hello@ardourdigital.co.uk or call +44 (0)177 3254 150.


Leave a Comment