add title text to link in navbar

And group logic into 1 macro.