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