Initial import of Francesco Banconi's code
fix url in templates