Versatile preparation method for mesoporous TiO2 electrodes suitable for solid-state dye sensitized photocells