Skip to content

Commit

Permalink
addnewpage with @ns@ in sidebar (#77)
Browse files Browse the repository at this point in the history
If you use addnewpage with @ns@ in the sidebar, you get the namespace 
of the sidebar page (global ) and not the viewed one.
  • Loading branch information
mw75 authored May 7, 2023
1 parent 52cbbe7 commit ccc8b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function render($mode, Doku_Renderer $renderer, $data) {
* @author Michael Braun <[email protected]>
*/
protected function _parseNS($ns) {
global $ID;
$ID=getID();
if(strpos($ns, '@PAGE@') !== false) {
return cleanID(str_replace('@PAGE@', $ID, $ns));
}
Expand Down

0 comments on commit ccc8b5f

Please sign in to comment.