Wiki source code of AWM Page Creation
Last modified by Vincent Massol on 2024/11/19 16:12
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | In AppWithinMinutes we want to simplify page creation. We don't want users to have to give the title of a page before they start editing the content of the page. This should happen automatically based on a rule that is set for this creation. | ||
| 2 | |||
| 3 | == Add the "create" action == | ||
| 4 | |||
| 5 | * The create action would be protected by the "create" right in the Space in which it is called | ||
| 6 | * The create action would be called on the home page of a space | ||
| 7 | * The create action would support an additional parameter called "namingrule" | ||
| 8 | |||
| 9 | In general the create would behave like the save but with the differences listed before. Preview should still be supported. | ||
| 10 | Save and Continue/Save should be replaced by "Create". | ||
| 11 | |||
| 12 | == Naming Rules == | ||
| 13 | |||
| 14 | The following naming rules should be available: | ||
| 15 | |||
| 16 | |= Rule name |= Rule | ||
| 17 | | title | Use the title field. | ||
| 18 | | titleclean | Use the title field and add optional cleaning of fields. The cleaning rule can be additional parameters. | ||
| 19 | | field | Use the title field. | ||
| 20 | | fieldclean | Use the title field and add optional cleaning of fields. The cleaning rule can be additional parameters. | ||
| 21 | | prefix | Use a provided prefix. The clean rule can be additional parameters. | ||
| 22 | | custom | Use a groovy script provided to generate the page name. | ||
| 23 | |||
| 24 | The "namingcounter" parameter would add automatically and additional counter. The counter could be handled automatically in a counter queue or use a value in the page. | ||
| 25 | |||
| 26 | The following types of counter are possible | ||
| 27 | |||
| 28 | * none (in this case the creation fails if the page already exists) | ||
| 29 | * page name counter (extract the counter from the page name) | ||
| 30 | * field value counter (extract the counter from a field) | ||
| 31 | * queue counter (extact the counter from a counter queue in the database) | ||
| 32 | * queue counter with uniqueness (extact the counter from a counter queue in the database without the possibility to reuse an existing number) | ||
| 33 | |||
| 34 | == Adding a create view == | ||
| 35 | |||
| 36 | The create view would allow to have a custom view and custom buttons during the creation process. This can be called directly from the "Add" button in XWiki. | ||
| 37 | The create view should use either parameters provided in the URL or the provided template to find the "create sheet" and the page naming parameters to use. | ||
| 38 | |||
| 39 | |||
| 40 | == Validation == | ||
| 41 | |||
| 42 | The "create" process should support the validation system in place for editing. |