It would need to be a namespace template since your namespace is always the same: "discussion". You could use one of these replacement patterns in the title, like Discussion - @!!PAGE@
. Since each of your discussion pages has their own ID/URL (like each page they originate from), they should be unique and keep each discussion exclusive to the original page and separated, automatically.
You could use yet another line of javascript code to have the new discussion page created without pressing any button. Just let Javascript do the work for you! Something like this:
if ( JSINFO['id'].split(':')[0] == 'discussion' ) { setTimeout(function() { jQuery("#edbtn__save").click(); }, 100); }
What this does, it gives DokuWiki a little timeout (100ms) to load the namespace template and then clicks the save button. But, since the only button it looks for, is the editor save button
, it won't interfer with your discussion board. And, yes indeed, it is a little clickbot. 😄