url building adjusted to work around pagename
work in progress
extern links will be open in a new tab