Add pages functionality to board.php