This is certainly a valid solution. So I can't really be critical about it.   That said, here are some considerations:



1. If "current.getLink()" is changed to return different link text, your replace may fail.


2. Likewise, in the solution I posed, if the URL to present the navigational pane ever changes, my string concatenation could produce a URL that fails.



So there you have it.   Either option will work for a while.   Each is vulnerable to a future change to the system.     Which change is more probable?   I really can't say.   But if you have an idea that one is more probably then the other, I would use that as a basis for selecting which option to use.