Documentation > CMS Template API Library > PaginatePanelResult
CrownPeak.CMSAPI.PaginatePanelResult : CrownPeak.CMSAPI.PaginateResultBase`1[[CrownPeak.CMSAPI.PanelEntry, CMSAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Returns the results of the paginate call. You can enumerate over it to get the sub list items.
| Name | Description | Type |
|---|
Code Example
C#
Sample:
List<PanelEntry> panels = asset.GetPanels("field");
PaginatePanelResult result = Util.Paginate(panels, 10);
// Print links to press releases on the current page
foreach(PanelEntry panel in result)
{
Out.WriteLine("<p>{0}</p>", panel["field"]);
}
// Print links to other pages
foreach (PageLink link in result.PaginatedLinks)
{
if (link.IsCurrent())
{
Out.WriteLine("{0}|", link.PageNumber);
}
else
{
Out.WriteLine("<a href=\"{0}\">{1}</a>|", link, link.PageNumber);
}
}