made the layout.html's getPageNumber compatible with the main implementation in magazine.js...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>