Pager Tag

In this article:


For today in the WEB world nobody can`t image complex web-page with repeated material without simple pager. ImCMS make developers life easier. ImCMS pager tag that split repeated content on separate pages.

Use in template

For configure pager tag in template. Consider code below.

<imcms:pager visibleItemCount="6">
    ${firstPagerItem} <!--use firstPagerItem here to hold link on first page-->
        ${pagerItem} <!--use pagerItem here-->
    ${lastPagerItem} <!--use firstPagerItem here to hold link on last page-->


pager tag must be inside tag, that implements IPageableTag interface.

Available list of tag attributes:

Attribute Type Description
visibleItemCount Integer Optional attribute. Describe how many page links will be shown at once


Consider example below. Since search tag implements IPageableTag - pager tag can be inserted into it.

<%@taglib prefix="imcms" uri="imcms" %>

<!DOCTYPE html>
<html xmlns="" xml:lang="en" lang="en">
    <meta charset="utf-8"/>
<imcms:search searchRequest="" skip="0" take="20">
    <ul class="simple-post-list">
                <div class="post-info">
                    <a href="${pageContext.request.contextPath}/${searchItem.foundDocument.alias}">${searchItem.foundDocument.headline}</a>

                    <div class="post-meta">
    <imcms:pager visibleItemCount="6">
        <ul class="pagination pull-right">
            <li><a href="${}">a</a></li>
                    <c:when test="${pagerItem.showed}">
                        <li class="active"><a href="${}">${pagerItem.pageNumber}</a>
                        <li><a href="${}">${pagerItem.pageNumber}</a></li>
            <li><a href="${}">1</a>