Warning: It is unclear whether this example can be built using the information provided in the book to this point. It is unclear how reference nodes can be added. Maybe extra modules are required? It also appears to promote obsolete technologies (References intead of Entity References).
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.
Figure 6.4: An example of how the finished documentation collection may look.
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 the 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.
- 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.) Note: Entity reference can replace References.
- Add a new content 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.)
- 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.)
- The suggested solution should be updated to use the Entity reference module, rather than References.
- As with documentation pages, it does not really make sense to add collections to menu, so all menus may be deselected in the node type settings.
|05.4 Documentation collection.png||74.17 KB|