It's already in $BOOST_ROOT/index.php, so isn't needed in the template file.
It's a bit awkward, but to generate a page needed to update BoostPages_Page, which wasn't always appropriate. So now generate pages just using the data from the quickbook source, combined with the state data.
Having the site in two different languages is a bit of a pain, so convert everything to PHP.