]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FCreatePagePlugin
Wikicreole syntax
[SourceForge/phpwiki.git] / pgsrc / Help%2FCreatePagePlugin
1 Date: Fri, 10 Sep 2010 13:46:13 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FCreatePagePlugin;
6   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
7   markup=2;
8   charset=UTF-8
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 {| class="bordered"
31 |-
32 ! Argument
33 ! Description
34 ! Default value
35 |-
36 | **s**
37 | The pagename, which will passed to the plugin.
38 |
39 |-
40 | **initial_content**
41 | The new page will be pre-filled with this content.
42 |
43 |-
44 | **template**
45 | The new page will be pre-filled with the content of this page.
46 |
47 |-
48 | **vars**
49 | Variables to be expanded.
50 |
51 |-
52 | **overwrite**
53 | Whether to overwrite an existing page.
54 |
55 |}
56
57 == Variable Expansion ==
58
59 The content (either initial_content or template) might hold some variables, which will be
60 expanded on creation. Unassigned variables will stay as %%<var>%%, assigned variables without
61 matching %%<var>%% placeholder will be ignored, without any warning.
62
63 A variable in a template is denoted as ##%%var%%##, which will be expanded by the
64 value of ##var## given to the vars argument (in urlencoded php notation).
65
66 Some special variables are automatically assigned:
67 {| class="bordered"
68 |-
69 | %%ctime%%  || $~WikiTheme->formatDateTime(time())
70 |-
71 | %%author%% || $user->getId()
72 |}
73
74 This forms together with page templates and the [[Help:WikiFormRichPlugin]] and
75 optionally the [[Help:SqlResultPlugin]] a framework to create templated pages.
76
77 == Authors ==
78 * Dan Frankowski
79 * [[PhpWiki:ReiniUrban|Reini Urban]]
80
81 == Examples ==
82
83 {{{
84 <?plugin-form CreatePage s=MyHomePage ?>
85 }}}
86 <?plugin-form CreatePage s=MyHomePage ?>
87
88 == See Also ==
89 * [[PhpWiki:EasilyCreateNewPages]]
90 * [[Help:WikiFormRichPlugin]]
91 * [[Help:SqlResultPlugin]]
92
93 <noinclude>
94 ----
95 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
96 </noinclude>