Changes between Version 4 and Version 5 of ParametrizedTemplatesPlugin
- Timestamp:
- Apr 14, 2015, 7:07:11 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ParametrizedTemplatesPlugin
v4 v5 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Trac Parametrized Templates =3 = Trac Parametrized Templates 4 4 5 == Description ==5 == Description 6 6 7 7 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. 8 8 9 == Bugs/Feature Requests ==9 == Bugs/Feature Requests 10 10 11 11 Existing bugs and feature requests for ParametrizedTemplatesPlugin are … … 15 15 [http://trac-hacks.org/newticket?component=ParametrizedTemplatesPlugin&owner=airadier new ticket]. 16 16 17 == Download == 17 [[TicketQuery(component=ParametrizedTemplatesPlugin&group=type,format=progress)]] 18 19 == Download 18 20 19 21 Download the zipped source from [download:parametrizedtemplatesplugin here]. 20 22 21 == Source ==23 == Source 22 24 23 25 You can check out ParametrizedTemplatesPlugin from [http://trac-hacks.org/svn/parametrizedtemplatesplugin here] using Subversion, or [source:parametrizedtemplatesplugin browse the source] with Trac. 24 26 25 == Usage ==27 == Usage 26 28 27 29 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. … … 29 31 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. 30 32 31 To activate the plugin, add the following line (as usual) to trac.ini:33 To activate the plugin, add the following line to your `trac.ini` file: 32 34 33 {{{ 34 ... 35 35 {{{#!ini 36 36 [components] 37 37 parametrizedtemplates.* = enabled 38 39 ...40 38 }}} 41 39 42 Then create templates containing parameters. Parameter format is '''{{parameter_name, Description or title, field_type, default_value}}''' 40 Then create templates containing parameters. Parameter format is '''{{parameter_name, Description or title, field_type, default_value}}''': 43 41 44 42 * Available field types are: … … 47 45 * ''default_value'': Sets a default value for this parameter, instead of empty. If a default_value is set, ''field_type'' must be set too. 48 46 49 50 === Example === 47 === Example 51 48 52 49 An example template: … … 62 59 }}} 63 60 64 when creating a new page from that template, you 'll get a form like:61 when creating a new page from that template, you will get a form like: 65 62 66 63 [[Image(screenshot.png)]] 67 64 68 === Notes ===65 === Notes 69 66 70 67 * 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 ocurrence. … … 72 69 * 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''' in order to fill the form. 73 70 74 == Recent Changes ==71 == Recent Changes 75 72 76 73 [[ChangeLog(parametrizedtemplatesplugin, 3)]] 77 74 78 == Author/Contributors ==75 == Author/Contributors 79 76 80 77 '''Author:''' [wiki:airadier] [[BR]] 81 '''Maintainer:''' [ wiki:airadier] [[BR]]78 '''Maintainer:''' [[Maintainer]] [[BR]] 82 79 '''Contributors:'''