[[PageOutline(2-5,Contents,pullout)]] = Create wiki pages from templates == Description Create pages from templates with parameters, using a form to input the parameter values. When making a page template, you can add some parameters. When a new page is created using that template, a form will be displayed, with a field for every parameter, and the page will be created by replacing the values submitted in that form. With this plugin, it is possible to add parameters to a wiki page template, so when creating a new wiki page from this template an intermediate form is displayed, where a field is shown for each of the parameters in the template. When the form is submitted, the page is created from the template, replacing every parameter specification in the template with the values from the form. An example template: {{{ = Example page template This is value of parameter 1: {{param1, Title for parameter 1}} This is a textarea parameter 2: {{param2, Title for parameter 2, textarea}} }}} when creating a new page from that template, you will get a form like: [[Image(screenshot.png)]] '''Notes''': * If a parameter is repeated over the template (same parameter name), only one entry will be shown in the form, using the description from the first occurrence. * A new page can be created using the url `/newpage/PageName?template=TemplateName`. * The plugin will intercept when a new page is created via the traditional way (`/wiki/PageName?template=TemplateName`), if the page doesn't exist and the template does contain any parameters, and will redirect the user to `/newpage/PageName?template=TemplateName` to fill the form. == Bugs/Feature Requests Existing bugs and feature requests for ParametrizedTemplatesPlugin are [report:9?COMPONENT=ParametrizedTemplatesPlugin here]. If you have any issues, create a [/newticket?component=ParametrizedTemplatesPlugin new ticket]. [[TicketQuery(component=ParametrizedTemplatesPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:parametrizedtemplatesplugin here]. == Source You can check out ParametrizedTemplatesPlugin from [/svn/parametrizedtemplatesplugin here] using Subversion, or [source:parametrizedtemplatesplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. To activate the plugin, add the following line to your `trac.ini` file: {{{#!ini [components] parametrizedtemplates.* = enabled }}} == Configuration To create templates containing parameters, use the following format: `{{parameter_name, Description or title, field_type, default_value}}`. * Available field types are: * '''textarea''': a big text area with scrollboxes. * '''text''', by default, or if not specified, a single line text box. * '''default_value''': Sets a default value for this parameter, instead of empty. If a default_value is set, then `field_type` must be set too. == Recent Changes [[ChangeLog(parametrizedtemplatesplugin, 3)]] == Author/Contributors '''Author:''' [wiki:airadier] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''