Kelvin,
Thanks. :( Unfortunately all I get on the page is a blank HREF, that is:
<a HREF="" "">
Below is the section of code where the page numbers are generated.
I've placed the tmpl code below the echo statement, within the if statement.
In theory $right_arrow should contain the same HREF info as the echo statement, but it is not passing it to the template.
There are no errors shown. Any suggestions?
--------------------------------------------------------------------------
if ($page != 0) // Don't show back link if current page is first page.
{$back_page = $page - $limit;
echo("<a href="$PHP_SELF?query=$query&page=$back_page&limit=$limit">back</a>
");
}
for ($i=1; $i <= $pages; $i++) // loop through each page and give link to it.
{
$ppage = $limit*($i - 1);
if ($ppage == $page)
{
echo("<font color=red size=4><b>$i</b></font>
"); // If current page, don't give link, just text.
}
else{
echo("<a href="$PHP_SELF?query=$query&page=$ppage&limit=$limit">$i</a>
");
}
}
//-----------------TMPL CODE IS BELOW--------------------
if (!((($page+$limit) / $limit) >= $pages) && $pages != 1) // If last page don't give next link.
{
$next_page = $page + $limit;
echo(" <a href="$PHP_SELF?query=$query&page=$next_page&limit=$limit">NEXT</a>
");
$right_arrow = $PHP_SELF.'?query='.urlencode($query).'&page='.$next_page.'&limit='.$limit;
$tmpl->setVar('right_arrow', $right_arrow);
}