Adds setActiveLink method.