XHTML Transitional Compliant Paging with ADOdb
Posted on January 4, 2008
Following on from my previous post, I've cleaned up the getNavigation() function to generate XHTML Transitional compliant code. It's good for all kinds of things, if nothing else, you'll live longer.
Just replace the following function in your class.GenericEasyPagination.php
function getNavigation()
{
$result = "";
$previous = $this->currentPage - 1;
$next = $this->currentPage + 1;
if ($this->getsVars ==""):
if ($this->PagesFound>1):
if ($this->currentPage!=1):
$result .= "
";
endif;
if ($this->currentPage>1): $result .= "< border="0" src="/_common_images/icons/resultset_previous.png"> "; endif;
if (($this->currentPage < $this->PagesFound) && ($this->PagesFound >= 1)): $result .= "
";
endif;
if (($this->PagesFound>1)&&($this->currentPage!=$this->PagesFound)):
$result .= "
";
endif;
endif;
else:
if ($this->currentPage!=1):
$result = "
";
endif;
if ($this->currentPage>1): $result .= "
"; endif;
if (($this->currentPage<$this->PagesFound) && ($this->PagesFound>=1)): $result .= "
"; endif;
if (($this->PagesFound>1)&&($this->currentPage!=$this->PagesFound)):
$result .= " >>";
endif;
endif;
return $result;
}
Related posts
- Retro Fitting Record Pagination with ADOdb
For my first project of the New Year I had to retro-fit pagination controls to... - Custom Shopp Gallery
Hot off the press, here is a reformatted Shopp gallery function to overcome the current... - Nicer Pagination with ADOdb
Or should that be Nicr? To follow in an annoying theme. Olavo Alexandrino wrote a... - Highlighting current page in WordPress Menus
By default, wp_nav_menu doesn't create a .current_page_item or .current-menu-item class for certain elements in a wp_nav_menu,... - ADOdb’s GetMenu() function moreAttr bug
I'm sure there is a bug with ADOdb's GetMenu() function The documentation suggests 'use $moreAttr...



