Documentation > CMS Template API Library > PageLink > IsCurrent()
IsCurrent
Is this a link to the current page
public System.Boolean IsCurrent()
Code Example
C#
Sample:
            PaginateResult result = Util.Paginate(asset, "Name");
            // Print links to press releases on the current page
            foreach(Asset child in result)
            {
             Out.WriteLine("<a href=\"{0}\">{1}</a><br/>",child.GetLink(), child.Label);
            }
            
            // 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);
              }
            }