Pagination

From GruppoZenit
Jump to: navigation, search

Z-CMS supports pagination through the following Z-CMS tags:

Pagination can be realized for content data which is presented using zcms:content or zcms:content-search tags. These two tags are to be associated respectively with relevant pagination tags as mentioned below.


Value specified for the "Id" attribute of zcms:content or zcms:content-search tag is to be specified as the value for the "Name" attribute of zcms:pageprevious, zcms:pagecurrent and zcms:pagenext pagination tags.


Such values can be used as in the following example.

<zcms:content-search match="ANY_WORDS" parameters="txtsearch" datacount="10" id="search1" enablepage="true">
   <zcms:content name="news">
      <zcms:datacolumn name="ID" alias="id"/>
      <zcms:datacolumn name="TITLE" alias="title"/>
      <zcms:datacolumn name="DESCRIPTION" alias="description" />
      <zcms:datacolumn name="'NEWS'" alias="identifier"/>
      <zcms:filter attribute="PUBLISH" value="1"/>
   </zcms:content>
   <zcms:search-result>
      <div>
         <li><zcms:attribute name="title" /> --- <zcms:attribute name="description" /></li>
      </div>
   </zcms:search-result>
</zcms:content-search>      
   <zcms:pageprevious name="search1">
      <zcms:pagelink>        
         <a href=" http://www.sitename.it/en/home/search?selpage=[zcms:pagenumber]"><zcms:pagenumber />
         </a>
      </zcms:pagelink>                            
   </zcms:pageprevious>
   <zcms:pagecurrent name="search1" />
   <zcms:pagenext name="search1">
      <zcms:pagelink>
         <a href="http://www.sitename.it/en/home/search?selpage=[zcms:pagenumber]"><zcms:pagenumber />
         </a>
      </zcms:pagelink>                            
</zcms:pagenext>


See also

Personal tools
Namespaces

Variants
Actions
Toolbox