Thermally stable luminescent composites fabricated by confining rare earth complexes in the two-dimensional gallery of titania nanosheets and their photophysical properties.