diff --git a/router/template_functions.go b/router/template_functions.go index e0aefd57..6853f501 100644 --- a/router/template_functions.go +++ b/router/template_functions.go @@ -144,6 +144,12 @@ var FuncMap = template.FuncMap{ url, _ := Router.Get(nav.Route).URL("page", strconv.Itoa(nav.CurrentPage+1)) ret = ret + "
  • »
  • " } + itemsThisPageStart := nav.MaxItemPerPage * (nav.CurrentPage - 1) + 1 + itemsThisPageEnd := nav.MaxItemPerPage * nav.CurrentPage + if nav.TotalItem < itemsThisPageEnd { + itemsThisPageEnd = nav.TotalItem + } + ret = ret + "

    " + strconv.Itoa(itemsThisPageStart) + "-" + strconv.Itoa(itemsThisPageEnd) + "/" + strconv.Itoa(nav.TotalItem) + "

    " } return template.HTML(ret) },