The morphology of TiO2 plays an important role in the operation of solid-state dye-sensitized solar cells. By using polyisoprene-block- ethyleneoxide (PI-b-PEO) copolymers as structure directing agents for a sol-gel based synthesis of mesoporous TiO2, we demonstrate a strategy for the detailed control of the semiconductor morphology on the 10 nm length scale. The careful adjustment of polymer molecular weight and titania precursor content is used to systematically vary the material structure and its influence upon solar cell performance is investigated. Furthermore, the use of a partially sp 2 hybridized structure directing polymer enables the crystallization of porous TiO2 networks at high temperatures without pore collapse, improving its performance in solid-state dye-sensitized solar cells. © 2009 The Royal Society of Chemistry.