NAME
Kwiki::PageTemplate - pre-fill kwiki page with this template
SYNOPSIS
Paste this into your SandBox and visit the SandBox.
.page_template_fields
page_id_prefix: Resume
name: text
gender:
- Woman
- Woman-in-man
bio: textarea
.page_template_fields
.page_template
= Resume form
My name: {field:name}
Email: {field:name}
Biograph:
{field:bio}
.page_template
Fill the above form and you will probabally get the job.
DESCRIPTION
This purpose of this plugin is to let your Kwiki User edit pages even more easily. They only have to type some characters into a given form, submit it, and done. Not even Kwiki formatter syntax knowledged required.
The basic idea is from mac.com hompage editing, they provide a nearly WYSIWYG web interface to edit your homepage, because the have many pr-defined HTML templates, which are a big form, after you submit that form, what you just inputed replace the original input fields, becomes the content of the generated page.
The "page_template_fields" wafl block is a YAML block where you can define your form variables, and their input types, if the type is a array, it'll become a pull-down select menu. After user submit the form, this plugin will generate a page prefixed with the value "page_template_page_id_prefix", default to "PageTemplateGenerated" in your config/page_template.yaml, but you may specify "page_id_prefix" in the page_template_fields wafl block to override this. The example given in SYNOPSIS demostrate this feature, let the form generate a page named like "Resume3", the number afterwards are increased automatically each time somebody submit the form.
By default, the generated page will preserve same look as in the "page_template" block. But if you want to display the generated page in another look, you may write the template code in "page_template_display" wafl block.
This plugin is still in it's early development and currently, re-editing the generated page is not implemented, and something may break in the future. So use it at your on risk.
COPYRIGHT
Copyright 2004 by Kang-min Liu <gugod@gugod.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>