pot files maybe..
[ikiwiki] / doc / todo / adding_new_pages_by_using_the_web_interface.mdwn
1 Perhaps I'm just too stupid to find the proper way to do this, but how
2 would I add a new page to the wiki without selecting to edit an already
3 installed one and frobbing the URL to direct to the to-be-created page?
4 --[[ThomasSchwinge]]
5
6 Good point. Of course one way is to start with creating a link to the page,
7 which also helps prevent orphans. But other wikis based on CGI do have this
8 a bit easier, since they can detect an attempt to access a nonexistant page
9 and show an edit page. Ikiwiki can't do that (unless its web server is
10 configured to do smart things on a 404, like maybe call ikiwiki.cgi which
11 could be modified to work as a smart 404 -> edit handler).
12
13 Some wikis also provide a UI means for creating a new page. If we can find
14 something good, that can be added to ikiwiki's UI. --[[Joey]]
15
16 Hmm, maybe just a preprocessor directive that creates a form inside a page,
17 like is used for blog posting already would suffice? Then the main page of
18 a wiki could have a form for adding new pages, if that directive were
19 included there. Won't work for subpages though, unless the directive were
20 added to the parent page. However, unconnected subpages are surely an even
21 rarer thing to want than unconnected top level pages. --[[Joey]]
22
23 > Here is a simple plugin that does that. Perhaps options could be added to
24 > it, but I couldn't really think of any.
25 > <http://jameswestby.net/scratch/create.diff>
26 > -- JamesWestby
27
28 > For what it's worth, the following works:  
29 > `\[[!inline pages=!* rss=no atom=no postform=yes postformtext="Add a new page titled:"]]`  
30 > Add `rootpage=/` if you do this in `index.mdwn` to avoid creating subpages.
31 > --[[JeremieKoenig]]
32
33
34 Maybe a very simple PHP frontend for serving the
35 statically generated pages, that would display a page editing form or
36 something like that for non-existent pages, wouldn't be too bad a thing
37 and resource hog? Just a thought... --[[Tuomov]]