I've made some modification to the ZWikiPage.py and created new dtml method to alter new pages creation. Now after clicking on the question character, the specizlized EditForm? is opened with two buttons: Cancel and Create Page. Only if the CreatePage? is pressed, the page will be created. Here is the modifications:

ZWikiPage.py at the end of _wikilink_replace(self, match) method the last line is changed **(make sure to copy from the edit screen instead of from the displayed page because [] stuff isn't displaying correctly)** :

        elif hasattr(self.aq_parent, m):
            # if something of this name exists, link to it;
            return '<a href="%s">%s</a>' % (quote(m), m)
        else:
            # otherwise, provide a "?" creation link
            # OLD CODE: return '%s<a href="%s/new?id=%s">?</a>' % (m, quote(self.id()), quote(m))
            return '%s<a href="%s/newform?newid=%s&cols=70&rows=20">?</a>' % (m, quote(self.id()), quote(m))

And the new dtml method newform must be created :

 <dtml-with this>
 <dtml-if "_.hasattr(this(),'minimal_header')">
 <dtml-var "minimal_header(this (),REQUEST,RESPONSE,title_text='Creating page '+ newid)">
 </dtml-if>
 <html>
 &lt;disabled SCRIPT LANGUAGE="Javascript"&gt; <!--
 function GoBack(){self.History.Back();} //-->
 &lt;disabled /SCRIPT&gt;
 <body>
 <FORM METHOD="POST" ACTION="new" ENCTYPE="multipart/form-data">
 <dtml-unless "_.hasattr(REQUEST,'rows')">
 <dtml-call "REQUEST.set('rows',15)">
 </dtml-unless>
 <dtml-unless "_.hasattr(REQUEST,'cols')">
 <dtml-call "REQUEST.set('cols',70)">
 </dtml-unless>
 <div align="center">
 <TEXTAREA WRAP="virtual" NAME="text" ROWS=<dtml-var rows> COLS=<dtml- var cols>></TEXTAREA>
 </div>
 <input type="hidden" name="id" value="<dtml-var newid>">
 <br>
 <table width="100%" border="0" cellspacing="0" cellpadding="3"  bgcolor="eeeeff">
 <tr>
 <td valign="middle" align="left">
 See 
 <a href="../HowDoIEdit">HowDoIEdit</a> or
 <a href="../TextFormattingRules">TextFormattingRules</a>
 for more help
 </td>
 <td valign="middle" align="right">
 <INPUT TYPE="button" NAME="Cancel" VALUE="Cancel"  OnClick="self.history.back()">
 <INPUT TYPE="submit" NAME="Change" VALUE="Create page <dtml-var newid>">
 <dtml-unless "AUTHENTICATED_USER.has_permission('Add ZWiki Pages',this())">
 <br><em>
 (adding this page<br>
 will require a login)
 </em>
 </dtml-unless>
 </td>
 </tr>
 </table>
 <br>
 </FORM>
 <dtml-if "_.hasattr(this(),'minimal_footer')">
   <dtml-var "minimal_footer(this(),REQUEST,RESPONSE)">
 <dtml-else>
   </body>
   </html>
 </dtml-if>
 </dtml-with>

--EdwardKreis

NOTE: The similiar Cancel button can be added to EditForm? too.


See also ZwikiModification