The sol-gel method has been employed in the fabrication of easily processable mesostructured films consisting of a nonionic surfactant and silica as the inorganic component. The ability of the occluded Pluronic P123 mesostructures to solubilize guest molecules made these films ideal host matrices for organic dyes and molecular assemblies, possessing substantial nonlinear susceptibilities. These films were explored for use as the photonic layer in all-optical time-to-space converters and proved successful at increasing the optical response of the intercalated dyes to a point that would make these composite films applicable for use as the photonic layer. Recording of a dynamical grating in a single-pulse regime has been obtained. Since the dynamical grating exhibits the fast relaxation time (up to 10 ns), the nonlinear mechanism represents an electronic excitation of the photosensitive molecules. As far as the dye molecules are distributed in nanoporous silica, a model of 'gas of molecular dye' may be rightly used in order to consider nonlinear optical properties in the nanostructured hybrid films. We suppose that further improvement of the nonlinear optical nanomaterials may follow on the way to embed additional inclusions, which will not promote the heat accumulation in the host matrix and will lead to effective dissipation of the heat energy.