A new approach to the preparation of materials with recognition properties towards analytes of environmental and food interest