A new route towards nanoporous TiO2 as powders or thin films from the thermal treatment of titanium-based hybrid materials.