Diff: Help/CreatePagePlugin

Differences between current version and predecessor to the previous major change of Help/CreatePagePlugin.

Other diffs: Previous Revision, Previous Author

Newer page: version 3 Last edited on October 14, 2015 11:47 am by PhilHollenback
Older page: version 2 Last edited on February 23, 2012 2:51 pm by PhilHollenback Revert
@@ -1,7 +1,7 @@
 The **~CreatePage** [[Help:WikiPlugin|plugin]] allows to easily create new pages, optionally with default content. 
  
-This allows you to create a page geting the new pagename from a 
+This allows you to create a page getting the new pagename from a 
 forms-based interface, and optionally with the initial content from 
 some template. 
  
 Put a {{{<?plugin-form CreatePage ?>}}} at some page, browse this page, 
@@ -65,9 +65,9 @@
 optionally the [[Help:SqlResultPlugin]] a framework to create templated pages. 
  
 == Authors == 
 * Dan Frankowski 
-* [[PhpWiki :ReiniUrban |Reini Urban]] 
+* [[Help :Reini Urban |Reini Urban]] 
  
 == Examples == 
  
 {{{ 
@@ -75,12 +75,11 @@
 }}} 
 <?plugin-form CreatePage s=MyHomePage ?> 
  
 == See Also == 
-* [[PhpWiki:EasilyCreateNewPages]]  
 * [[Help:WikiFormRichPlugin]] 
 * [[Help:SqlResultPlugin]] 
  
 <noinclude> 
 ---- 
 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]] 
 </noinclude> 

current version

The CreatePage plugin allows to easily create new pages, optionally with default content.

This allows you to create a page getting the new pagename from a forms-based interface, and optionally with the initial content from some template.

Put a <?plugin-form CreatePage ?> at some page, browse this page, enter the name of the page to create, then click the button.

Usage

<?plugin-form CreatePage ?>
<?plugin-form CreatePage template=CategoryHomePage ?>
<?plugin-form CreatePage template=SomeTemplatePage vars="year=2004&name=None" ?>

Arguments

Argument

Description

Default value

s

The pagename, which will passed to the plugin.

initial_content

The new page will be pre-filled with this content.

template

The new page will be pre-filled with the content of this page.

vars

Variables to be expanded.

overwrite

Whether to overwrite an existing page.

Variable Expansion

The content (either initial_content or template) might hold some variables, which will be expanded on creation. Unassigned variables will stay as %%<var>%%, assigned variables without matching %%<var>%% placeholder will be ignored, without any warning.

A variable in a template is denoted as %%var%%, which will be expanded by the value of var given to the vars argument (in urlencoded php notation).

Some special variables are automatically assigned:

%%ctime%%

$WikiTheme->formatDateTime(time())

%%author%%

$user->getId()

This forms together with page templates and the Help:WikiFormRichPlugin and optionally the Help:SqlResultPlugin a framework to create templated pages.

Authors

Examples

<?plugin-form CreatePage s=MyHomePage ?>

See Also



Our Founder
ToolboxClick to hide/show