Links generation moved to a macro