#set($pageCount = $group.getPageCount(12)) #if ($pageCount > 1) #set($minPage = $page - 5) #if ($minPage < 1) #set($minPage = 1) #end #set($maxPage = $page + 5) #if ($maxPage > $pageCount) #set($maxPage = $pageCount) #end #if ($minPage > 1 && $maxPage < 10) #set ($minPage = 1) #end #if ($pageCount - $minPage < 10) #set ($maxPage = $pageCount) #end #end