
As site member I want to be able to add freely chosen topics as tags to documentation pages and collections. This is important since it allows me to create another level of structure to the on-line documentation, making it easier to browse and search.
How to Demo:
- Log in to the site.
- Edit an existing documentation page and add one or several topic tags. Verify that you can add new topics.
- Add a documentation collection and add topics to it. Make sure you reuse at least one of the topics from the documentation page.
- Verify that topics appear as links when viewing documentation pages and collections. Also verify that the links lead to lists of all content tagged with the selected topic.
Required Preparations:
- The site should have documentation pages and collections, as described in the first exercises in this suite.
Additional Comments:
- In this user story it would work fine to reuse the taxonomy reference field for documentation pages in collections as well. But if the client in the future would like documentation pages to have exactly one topic, while collections can have several, you would have to break up a shared field into two separate – possibly with a lot of user-entered data being lost. Better is to use two separate fields, though identically configured.
- Whenever using the autocomplete field, it is a good habit to let the help text inform users that terms are separated by commas – not spaces.
- It is not completely obvious that we should use taxonomy terms for topics – maybe we should use simple text fields, or perhaps node references and have topics as nodes? But since everything we know about the topics (so far) tells us that it is metadata, taxonomy terms is a good choice. As a bonus, we get the listings wanted in this user story.
Modules:
Additional Resources:
Downloads:
| Attachment | Size |
|---|---|
| 6.08 KB |
Suggested Solution:
- Go to the taxonomy overview page and add a new vocabulary called topic. Give it a description before saving. (See creating and managing vocabularies and terms in chapter 7.)
- Go to the field overview for documentation pages and add a new field of the type term reference, using the autocomplete widget. (See taxonomy and fields in chapter 7.)
- Give the field a label topics, and let it refer to the topic vocabulary. Enter a help text and allow the user to add an unlimited number of terms to the field. (See adding new fields in the fields chapter.)
- Add a similar field to the documentation collection node type.
Solution Video: