Immobilization of nanobeads on a surface to control the size, shape and distribution of pores in electrochemically generated sol-gel films