]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/adding_new_pages_by_using_the_web_interface.mdwn
less necessary due to 404 plugin
[ikiwiki.git] / 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 > Since this todo was opened, the [[plugins/404]] plugin has been added;
14 > it does exactly that. Only if you have Apache, at the moment, though. --[[smcv]]
15
16 Some wikis also provide a UI means for creating a new page. If we can find
17 something good, that can be added to ikiwiki's UI. --[[Joey]]
18
19 Hmm, maybe just a preprocessor directive that creates a form inside a page,
20 like is used for blog posting already would suffice? Then the main page of
21 a wiki could have a form for adding new pages, if that directive were
22 included there. Won't work for subpages though, unless the directive were
23 added to the parent page. However, unconnected subpages are surely an even
24 rarer thing to want than unconnected top level pages. --[[Joey]]
25
26 > Here is a simple plugin that does that. Perhaps options could be added to
27 > it, but I couldn't really think of any.
28 > <http://jameswestby.net/scratch/create.diff>
29 > -- JamesWestby
30
31 > For what it's worth, the following works:  
32 > `\[[!inline pages=!* rss=no atom=no postform=yes postformtext="Add a new page titled:"]]`  
33 > Add `rootpage=/` if you do this in `index.mdwn` to avoid creating subpages.
34 > --[[JeremieKoenig]]
35
36
37 Maybe a very simple PHP frontend for serving the
38 statically generated pages, that would display a page editing form or
39 something like that for non-existent pages, wouldn't be too bad a thing
40 and resource hog? Just a thought... --[[Tuomov]]
41
42 ----
43
44 A quick round-up of how other wikis address this problem:
45
46  * mediawiki *used* to Offer a search box with two buttons: 'Go'
47    and 'Search'.  'Go' brought you to a page with the name you
48    typed if it exists, and searches otherwise.  In the latter case,
49    you get a link like this at the top of the search results:
50
51 > *There is no page titled "Testing". You can create this page.*
52
53  * wikia mediawikis have an "add a page" button that pops-up a JS
54    pseudo-window asking for a page name. On submission, you end
55    up at an edit window for the page.
56  * wikipedia now makes it quite hard to create new pages. The old
57    'go' button is gone, nearly all search terms end up at an actual
58    article, a "no results" match does not have helpful create link
59    options.
60  * Moin Moin has a two-button search: "Titles" and "Text".  Neither
61    offer a "create page" option for 0-match searches.
62  * the original c2.com wiki has no helpful link for this either.
63
64 So - the direction of travel would appear to be *away* from having
65 "new page" functionality.
66
67 I would suggest the following for ikiwiki:
68
69  * Extend the search results page to include a "create this page" link,
70    perhaps toggleable, perhaps only if the search term matches some
71    criteria for what makes a sensible page name
72  * Some combination of JamesWestby's "create" plugin, extracting the
73    current stuff inside [[plugins/inline]] (see also:
74    [[more flexible inline postform]]) -- more generally, rationalising
75    where that code lives so it can be used in more contexts.
76  * documenting the `inline` hack above (which I use extensively on my
77    private wikis, by the way!) as a [[tip|tips]].
78
79 -- [[Jon]]