-providing a first solution which includes at least an anion - providing a second solution which includes at least a cation - mixing the first solution with the second solution in presence of at least a first compound for forming porous templates, wherein the porous templates are formed by precipitation of a salt which includes the anion and the cation and wherein the first compound is at least partially incorporated in the porous templates and - at least partially cross-linking the first compound in the porous templates.