...
Section | |||||||
---|---|---|---|---|---|---|---|
| |||||||
We have defined a simple model for add-ons, spaces, and doctypes that can be specified with XML files. We provide XML schema files to support template authors in writing those models. Let's have a look at an exmple.
In this example you see a very slightly simplifed version of the Cheat doctype (see the current version of the doctype on Bitbucket). It defines two properties and gets a lot of standard properties inherited due to the reference to the standard base template. It also defines two sections and again, inherits a number of standard sections from the standard base template. Due to the value of the provide-type attribute, another doctype, called Cheat Type, will be created. This will allow authors to categorize cheats with a doctype-specific type. The doctype is associated with a default category. Doctype categories are used for grouping doctypes and render lists of references in a space homepage. Related doctypes – as you can see on the bottom of the XML document – are links rendered on homepages and index pages. Both structures support navigation and help readers to find information by browsing. |
...
Section | ||
---|---|---|
| ||
This is just the start of a journey. There are still features that cannot yet be expressed with the XML models. For instance the Module Type needs to list all documents with its type automatically. To specify such a section with a Display Table Macro running the query and listing the result set, you need to add plain XML of the storage format (xml element with the CDATA block inside).
A second issue is controlling the wizard or adding validation using JavaScript. While there is a basic form with validation generated, more complex requirements need to be written to a plain Soy or JavaScript file and will override the generated code at the end of the process. With this approach it is possible to use the plugin in a Maven build process and generate the required blueprints. Later new features can be added and the overriding parts can be replaced. |
Section | ||
---|---|---|
| ||
If you are interested to give the Doctype Maven Plugin a try, then
|
Section | ||
---|---|---|
| ||
...