getID() is what you are searching for:
//internal wiki link
$_vector_tabs_left["tab-wiki-hinweise"]["text"] = "Hinweise";
$_vector_tabs_left["tab-wiki-hinweise"]["wiki"] = ":hinweise:".getID();
$_vector_tabs_left["tab-wiki-hinweise"]["accesskey"] = "H"; //accesskey is optional
The problem is that you will get a "hinweise" page for every "hinweise" page itself... some kind of recursive. :-P. Therefore you might try the following:
//"Hinweise" tab
$_vector_tabs_left["tab-wiki-hinweise"]["text"] = "Hinweise";
$_vector_tabs_left["tab-wiki-hinweise"]["accesskey"] = "H"; //accesskey is optional
$namespace_hinweise = ':hinweise:';
if (preg_match("/^".$namespace_hinweise."?$|^".$namespace_hinweise.".*?$/i", ":".getNS(getID()))){
$_vector_tabs_left["tab-wiki-hinweise"]["wiki"] = ":".substr(getID(), strlen($namespace_hinweise)-1);
$_vector_tabs_left["tab-wiki-hinweise"]["class"] = "selected";
} else {
$_vector_tabs_left["tab-wiki-hinweise"]["wiki"] = $namespace_hinweise.getID();
}
The
$_vector_tabs_left["tab-wiki-hinweise"]["class"] = "selected"; is a small improvement for your usecase to highlight both the article and the "Hinweise" tab at the same time to show the context.
The code is not tested (I'm in a hurry) but should work - if you get an error or something like that just write again and I will have a look at it tomorrow.
Edit: sorry, made a logical and syntactical mistake in the code. Should work now... and the link should change if you are on a "Hinweise" Page. So you can switch between article and Hinweise by simply clicking on the link again