contao/test — Issue #1145: Add pagecount and current page variables to booknav module
Author: importer
Created: 2011-11-29 07:25:30+00:00
State: open
Labels: Feature, frontend

Currently the booknav supplies the template with prev, next and up page. It wouls we useful if also a pagecount and the current pagenumber would be added. After all, books have pages and this is the booknav module.

To this end I altere my own TL like below

In moduleBooknav.php after:
$arrLookup = array_keys($this->arrPages);
$intCurrent = array_search($objPage->id, $arrLookup);

I added:
$this->Template->pageCount = count($this->arrPages) - 1;
$this->Template->currenPage = $intCurrent;

[Download the attachments](http://www.contao.org/tl_files/tickets/1145.zip "Download the attachments of this ticket")
Related issues: #1189

--- _Originally created by Vera on November 5th, 2009, at 10:51pm (ID 1145)_