Add pagination filter to template context factory.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 30 May 2012 14:00:45 +0000 (16:00 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 30 May 2012 14:00:45 +0000 (16:00 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index 74fdfc2..c2bb1c8 100644 (file)
@@ -122,6 +122,7 @@ import net.pterodactylus.util.template.FormatFilter;
 import net.pterodactylus.util.template.HtmlFilter;
 import net.pterodactylus.util.template.MatchFilter;
 import net.pterodactylus.util.template.ModFilter;
+import net.pterodactylus.util.template.PaginationFilter;
 import net.pterodactylus.util.template.Provider;
 import net.pterodactylus.util.template.ReflectionAccessor;
 import net.pterodactylus.util.template.ReplaceFilter;
@@ -259,6 +260,7 @@ public class WebInterface implements CoreListener {
                templateContextFactory.addFilter("in", new ContainsFilter());
                templateContextFactory.addFilter("unique", new UniqueElementFilter());
                templateContextFactory.addFilter("mod", new ModFilter());
+               templateContextFactory.addFilter("paginate", new PaginationFilter());
                templateContextFactory.addProvider(Provider.TEMPLATE_CONTEXT_PROVIDER);
                templateContextFactory.addProvider(new ClassPathTemplateProvider());
                templateContextFactory.addTemplateObject("webInterface", this);