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;
7 Content-Transfer-Encoding: binary
9 The **~CreatePage** [[Help:WikiPlugin|plugin]] allows to easily create new pages, optionally with default content.
11 This allows you to create a page geting the new pagename from a
12 forms-based interface, and optionally with the initial content from
15 Put a {{{<?plugin-form CreatePage ?>}}} at some page, browse this page,
16 enter the name of the page to create, then click the button.
21 <?plugin-form CreatePage ?>
22 <?plugin-form CreatePage template=CategoryHomePage ?>
23 <?plugin-form CreatePage template=SomeTemplatePage vars="year=2004&name=None" ?>
35 | The pagename, which will passed to the plugin.
39 | The new page will be pre-filled with this content.
43 | The new page will be pre-filled with the content of this page.
47 | Variables to be expanded.
51 | Whether to overwrite an existing page.
55 == Variable Expansion ==
57 The content (either initial_content or template) might hold some variables, which will be
58 expanded on creation. Unassigned variables will stay as %%<var>%%, assigned variables without
59 matching %%<var>%% placeholder will be ignored, without any warning.
61 A variable in a template is denoted as ##%%var%%##, which will be expanded by the
62 value of ##var## given to the vars argument (in urlencoded php notation).
64 Some special variables are automatically assigned:
67 | %%ctime%% || $~WikiTheme->formatDateTime(time())
69 | %%author%% || $user->getId()
72 This forms together with page templates and the [[Help:WikiFormRichPlugin]] and
73 optionally the [[Help:SqlResultPlugin]] a framework to create templated pages.
77 * [[Help:Reini Urban|Reini Urban]]
82 <?plugin-form CreatePage s=MyHomePage ?>
84 <?plugin-form CreatePage s=MyHomePage ?>
87 * [[PhpWiki:EasilyCreateNewPages]]
88 * [[Help:WikiFormRichPlugin]]
89 * [[Help:SqlResultPlugin]]
93 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]