Get the number of pages of an article
When you show an article with only one page, you don't always want to show the list of pages. Insert this function in
functions.php to get the number of pages of the article.
Récupérer le nombre de chapitres d'un article
Lors de l'affichage d'un article, il peut être intéressant de connaitre son nombre de chapitre. Cela peut servir à ne pas afficher la liste des chapitres s'il n'y en a qu'un. Insérer la fonction suivante dans
functions.php pour récupérer ce nombre.
/**
Return the number of pages for an article.
@proto function pxArtNbPages
*/
function pxArtNbPages()
{
return $GLOBALS['_PX_render']['m']->art->pages->nbRow();
}