[layouts] change building of edition link to work with friendly urls