Composition comprising at least one ethylenically unsaturated monomer to which a photochemically isomerizable or dimerizable molecule is covalently bonded, and at least one ethylenically unsaturated monomer to which a sensitizer is covalently bonded, are outstandingly suitable for producing polymeric alignment layers for liquid crystals.