
As site member I want to be able to create and edit documentation pages, containing text, screenshot uploads and file attachments. This is important since it allows me to contribute to building the on-line documentation.
How to Demo:
- Log in to the site.
- Create a new documentation page, containing text, images and file attachments.
- Verify that text, images and file attachments are displayed when viewing the saved documentation page.
- Log out. As anonymous visitor, verify that the documentation page is not editable.
- Log in with another account. Verify that the documentation page is editable.
Required Preparations:
- An empty Drupal site.
Additional Comments:
- Since documentation pages probably won't be put in any menus, it could make sense to deselect all menu options in the node type setting.
- There are a lot of settings when adding new fields to content types. In most cases you can just use the default settings, and change whatever you need afterwards.
- It is useful to have conventions when deciding machine names for fields – it makes it easier for yourself and others to find and recognize them. One convention is to start each machine name with the name of the node type it is used on. (Or any other entity.)
- The content of the fields may not be displayed in the best way – but that is actually not a part of this user story. Writing and reading user stories in concise ways will help you focusing on the right tasks.
Modules:
Additional Resources:
Chapter 6 in Drupal 7 – the Essentials
Downloads:
| Attachment | Size |
|---|---|
| 4.76 KB |
Suggested Solution:
- Add a new content type Documentation page. Provide it with a description of how the content type will be used, such as Documentation pages are editable by all site members, and contain documentation about a given concept. (See node types and node administration in the nodes chapter.)
- Click the save and add fields button to go to the fields overview page for the node type.
- Add a new image field to the content type. Give it the label images, provide it with a help text, and allow an unlimited number of images to be uploaded into the field. (See adding new fields.)
- Add a new file field to the content type. Give it the label attachments, provide it with a help text and change the allowed file extensions to txt pdf doc xls zip tar.gz odt ods docx xlsx. Enable the description setting, and allow unlimited number of uploads in this field. (See adding new fields.)
- Change the permissions settings on the site, to allow all authenticated users to add and edit documentation pages. (See permissions and roles in the users and persmissions chapter.)
Solution Video: