added a public url function to the twig hooks