View Source:
Help/CreatePagePlugin
Note:
You are viewing an old revision of this page.
View the current version.
The **~CreatePage** [[Help:WikiPlugin|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=CategoryHomePages ?> <?plugin-form CreatePage template=SomeTemplatePage vars="year=2004&name=None" ?> }}} == Arguments == {| class="bordered" |- ! Argument ! Description ! Default value |- | **s** | The pagename, which will passed to the plugin. | //empty// |- | **initial_content** | The new page will be pre-filled with this content. | //empty// |- | **template** | The new page will be pre-filled with the content of this page. | //empty// |- | **vars** | Variables to be expanded. | |- | **overwrite** | Boolean. If true, overwrite an existing page. | false |} == 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: {| class="bordered" |- | %%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 == * Dan Frankowski * [[Help:Reini Urban|Reini Urban]] == Examples == {{{ <?plugin-form CreatePage s=MyHomePage ?> }}} <?plugin-form CreatePage s=MyHomePage ?> == See Also == * [[Help:WikiFormRichPlugin]] * [[Help:SqlResultPlugin]] <noinclude> ---- [[PhpWikiDocumentation]] [[CategoryWikiPlugin]] </noinclude>
BroadcastHistory
HomePage
How to use this Wiki
Adding Pages
List all Categories
Main Categories
CategoryWikiPlugin
CategoryActionPage
Search
Toolbox
Recent Changes
Recent New Pages
What links here
All pages
Recent Changes
RecentChangesCached
Tape Cartridge History
Favorite Categories
WikiPlugin
(140)
ActionPage
(77)
InterWiki
(18)
InterWiki
(18)
View Page
View Source
History
Diff
Sign In