
As site member I want to be able to create documentation collections, referring to one or several documentation pages. There should be room for entering a description for each collection. This is important since it allows me to organize the on-line documentation in a way that is meaningful to me, as well as take part of documentation structures others find useful.
How to Demo:
- Log in to the site.
- Create a new documentation collection, containing a description and referring to at least two documentation pages.
- Verify that collection description and links to the documentation pages are displayed when viewing the saved documentation collection.
- Edit the collection and change the order of documentation page references. Verify that the list order has changed accordingly when viewing the saved collection.
- Log out and log in with another account. Verify that the documentation collection is not editable.
Required Preparations:
- A number of documentation pages should be available on the site (see previous exercise).
- The References project should be downloaded and the Node Reference module installed. (Alternatively, a stable release of the Relation module could be used.)
Additional Comments:
- The Relation module is more flexible and more powerful than the References module – but is at time of writing not stable enough to document. See the elaboration on using fields for creating references for more information.
- As with documentation pages, it does not really make sense to add collections to menus – so all menus may be deselected in the node type settings.
Modules:
Additional Resources:
Downloads:
| Attachment | Size |
|---|---|
| 5.02 KB |
Suggested Solution:
- Add a new node type Documentation collection. Provide it with a description. Click save and add fields to go to the fields overview page. (See node types and node administration in the nodes chapter.)
- Make sure that the Node reference module is enabled. Then add a node reference field, for example using the label documentation pages. (See adding new fields.)
- Allow the node reference field to point to documentation pages only. Mark it as required, provide it with a help text, and allow users to enter an unlimited number of references in each field. (See adding new fields.)
- Go to the permissions list for the website, and set permissions to allow authenticated users to create and edit their own documentation collections. (See permissions and roles in the users and permissions chapter.)
Solution Video: