Adding dynamic link and beforeRender event