<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Adding Page Numbers (Pagination)</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Adding-Page-Numbers-Pagination-82280</link>
        <description></description>
        <pubDate>Tue, 14 Apr 2026 09:10:47 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Adding-Page-Numbers-Pagination-82280" rel="self" type="application/rss+xml" />

                <item>
          <title>Adding Page Numbers (Pagination)</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2244855#post2244855</link>
          <description><![CDATA[<p>That's exactly what I was looking for, thanks so much :) .</p>]]></description>
          <pubDate>Fri, 26 Jun 2020 02:09:25 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2244855#post2244855</guid>
        </item>
                <item>
          <title>Adding Page Numbers (Pagination)</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2244844#post2244844</link>
          <description><![CDATA[<p>Yes, I have some code below I use on a particular site that does what you are asking. It's a product listing page. There is probably a shorter, more succinct way to write it out in code but I'm not the greatest coder...but I try to be effective. Notice a couple important things: style is handled by css, there are pieces where the "else" shows nothing (but not notated) and is intentional. I'll include a screenshot of what it looks like visually.</p>
<p>&lt;!--begin page number notation--&gt;<br />&lt;div class="pagenumber"&gt;<br /><br />&lt;?php if ($productsMetaData['invalidPageNum']): ?&gt;</p>
<p>Results page '&lt;?php echo $productsMetaData['page']?&gt;' not found, &lt;a href="&lt;?php echo $productsMetaData['firstPageLink'] ?&gt;"&gt;start over &amp;gt;&amp;gt;&lt;/a&gt;.&lt;br&gt;&lt;br&gt;</p>
<p>&lt;?php elseif (!$productsRecords): ?&gt;</p>
<p>&lt;br&gt;<br />Those records are not currently available. Please click BACK in your browser.&lt;br&gt;&lt;br&gt;</p>
<p>&lt;?php endif ?&gt;</p>
<p>&lt;?php if ($productsMetaData['prevPage']): ?&gt;</p>
<p>&lt;a href="&lt;?php echo $productsMetaData['prevPageLink'] ?&gt;"&gt;&amp;lt;&amp;lt;&amp;nbsp;previous&amp;nbsp;&lt;/a&gt;</p>
<p>&lt;?php else: ?&gt;</p>
<p>&lt;?php endif ?&gt;</p>
<p>&lt;?php if (@!$_GET['page']): $current_page = "1";</p>
<p>else: $current_page = $_GET['page'];</p>
<p>endif; ?&gt;</p>
<p>&lt;?php foreach (range(1,$productsMetaData['totalPages']) as $page): ?&gt;</p>
<p>&lt;?php if ($page == $current_page): ?&gt;<br /><br />&lt;span class="bordertext"&gt;&amp;nbsp;page&amp;nbsp;&lt;?php echo $page; ?&gt;&amp;nbsp;&lt;/span&gt;<br /><br />&lt;?php else: ?&gt;</p>
<p>&lt;a href="?&lt;?php echo http_build_query(array_merge($_REQUEST, array( 'page' =&gt; $page ))) ?&gt;"&gt;&lt;?php echo $page; ?&gt;&lt;/a&gt;</p>
<p>&lt;?php endif ?&gt;</p>
<p>&lt;?php endforeach; ?&gt;</p>
<p>&lt;?php if ($productsMetaData['nextPage']): ?&gt;</p>
<p>&lt;a href="&lt;?php echo $productsMetaData['nextPageLink'] ?&gt;"&gt;&amp;nbsp;next&amp;nbsp;&amp;gt;&amp;gt;&lt;/a&gt;</p>
<p>&lt;?php else: ?&gt;</p>
<p>&lt;?php endif ?&gt;</p>
<p>&lt;/div&gt;<br />&lt;!--end page number notation--&gt;</p>
<p>The css I used for what you see:</p>
<p><br />.pagenumber {<br />font-style: normal;<br />font-weight: 600;<br />padding: 10px 0px;<br />text-align: center;<br />}</p>
<p>.bordertext {<br />border-color: #808080;<br />border-style: solid;<br />border-width: 2px;<br />border-radius: 8px;<br />}</p>
<p>I hope that works, or helps get you in the right direction.</p>
]]></description>
          <pubDate>Thu, 25 Jun 2020 15:22:34 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2244844#post2244844</guid>
        </item>
                <item>
          <title>Adding Page Numbers (Pagination)</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2244835#post2244835</link>
          <description><![CDATA[<p>So at present I have a fairly basic Previous / Next way of showing page numbers:</p>
<pre class="language-markup"><code>    &lt;?php if (!$isp_listRecords): ?&gt;
      &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;No records were found!&lt;/u&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;?php endif ?&gt;
  &lt;!-- /STEP2: Display Records --&gt;
  
  &lt;!-- STEP3: Display Page Links (Paste anywhere below "Load Record List") --&gt;
    &lt;div align="center" style="font-size:16px;"&gt;
    &lt;b&gt;
    &lt;?php if ($isp_listMetaData['prevPage']): ?&gt;
      &lt;a href="&lt;?php echo $isp_listMetaData['prevPageLink'] ?&gt;"&gt;&amp;lt;&amp;lt; PREV&lt;/a&gt;
    &lt;?php else: ?&gt;
      &amp;lt;&amp;lt; PREV
    &lt;?php endif ?&gt;

    - Page &lt;?php echo $isp_listMetaData['page'] ?&gt; of &lt;?php echo $isp_listMetaData['totalPages'] ?&gt; -

    &lt;?php if ($isp_listMetaData['nextPage']): ?&gt;
      &lt;a href="&lt;?php echo $isp_listMetaData['nextPageLink'] ?&gt;"&gt;NEXT &amp;gt;&amp;gt;&lt;/a&gt;
    &lt;?php else: ?&gt;
      NEXT &amp;gt;&amp;gt;
    &lt;?php endif ?&gt;
    &lt;/b&gt;
    &lt;/div&gt;
  &lt;!-- /STEP3: Display Page Links --&gt;</code></pre>
<p>But what I'd like to do is add a link for each specific page number. So instead of having "Page 1 of 2" in the middle of Previous / Next I might instead have "Page 1, 2, 3" etc. and each would be linked to load the specific page if clicked. Likewise the current page you are on would be highlighted in BOLD text. Is there an easy way to do that in CMSB?</p>]]></description>
          <pubDate>Wed, 24 Jun 2020 04:05:52 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2244835#post2244835</guid>
        </item>
              </channel>
    </rss>
  