]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FCreatePagePlugin
Wikicreole syntax for <verbatim>
[SourceForge/phpwiki.git] / pgsrc / Help%2FCreatePagePlugin
1 Date: Sun, 22 Feb 2009 19:16:30 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FCreatePagePlugin;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=iso-8859-1
9 Content-Transfer-Encoding: binary
10
11 The *~CreatePage* [[Help:WikiPlugin|plugin]] allows to easily create new pages, optionally with default content.
12
13 This allows you to create a page geting the new pagename from a 
14 forms-based interface, and optionally with the initial content from 
15 some template.
16
17 Put a "<~?plugin-form ~CreatePage ?~>" at some page, browse this page, 
18 enter the name of the page to create, then click the button.
19
20 == Usage
21
22 {{{
23      <?plugin-form CreatePage ?>
24      <?plugin-form CreatePage template=CategoryHomePage ?>
25      <?plugin-form CreatePage template=SomeTemplatePage vars="year=2004&name=None" ?>
26 }}}
27
28 == Arguments
29
30 *s*: |
31   The pagename, which will passed to the plugin. Default: ""
32 *initial_content*:  |
33   The new page will be pre-filled with this content. Default: ""
34 *template*:  |
35   The new page will be pre-filled with the content of this page. Default: ""
36 *vars*: |
37   variables to be expanded. Default: ""
38 *overwrite*: |
39   Whether to overwrite an existing page. Default: "" 
40
41 == Variable Expansion
42
43 The content (either initial_content or template) might hold some variables, which will be 
44 expanded on creation. Unassigned variables will stay as %%<var>%%, assigned variables without 
45 matching %%<var>%% placeholder will be ignored, without any warning.
46
47 A variable in a template is denoted as <tt>%%var%%</tt>, which will be expanded by the 
48 value of <tt>var</tt> given to the vars argument (in urlencoded php notation).
49
50 Some special variables are automatically assigned:
51
52 %%ctime%% | 
53   $~WikiTheme->formatDateTime(time())
54 %%author%% | 
55   $user->getId()
56
57 This forms together with page templates and the PhpWiki:WikiFormRichPlugin and 
58 optionally the PhpWiki:SqlResultPlugin a framework to create templated pages.
59
60 == Authors
61
62 Dan Frankowski, [Reini Urban|PhpWiki:ReiniUrban]
63
64 == Examples
65
66 <?plugin-form CreatePage s=MyHomePage ?>
67
68 See also PhpWiki:EasilyCreateNewPages, PhpWiki:WikiFormRichPlugin, PhpWiki:SqlResultPlugin
69
70 -------------
71
72 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]