
As site member I want a list of documentation pages that were updated recently. This is important since it helps me keep track of updates in the documentation on the site.
How to Demo:
- Log in to the site.
- Verify that there is a clearly visible link on the site with the text Recently updated documentation.
- Verify that the link leads to a page with a table of (at most) 25 documentation pages, containing information about page title, topic, update time, number of comments and a text marking any pages that were changed since they were last viewed.
- Verify that the list gets a pager if there are more than 25 documentation pages available.
- Edit a documentation page and re-save it. Verify that it appears at the top of the list, as most recently updated.
Required Preparations:
- The site should have a documentation page content type, as provided by the first exercise in this suite.
Additional Comments:
- Adding customized administrative titles to the view configuration may help you and other developers in the future.
- Don't forget to save your view often.
- An alternative to adding a menu link to the navigation menu would be to add it to the primary links – having it appear as a large tab. However, the long link text makes it unsuitable in a tab.
- In the quick-wizard there's an option for adding an RSS feed to the view. It is not a feature mentioned in the user story, but since the list will change often it could make sense to add a feed even without a request to do so.
Modules:
Additional Resources:
Downloads:
Suggested Solution:
- Go to the views overview page and add a new view. (See views overview in chapter 9.)
- In the quick-wizard, give the view a name and a description explaining what it does – such as recently updated documentation pages and a table of most recently updated documentation pages on the site. (See creating new views in chapter 9.)
- In the quick-wizard, also select that you want to display content of type documentation page. Check that you want a page, and that it should display a table of fields, 25 results at a time, using a pager. Also check the option for creating a menu item, adding it to the navigation menu with the link text recently updated documentation. (See creating new views.)
- Click continue & edit to enter Views' main configuration panel.
- Add a new view field content: all taxonomy terms, and at the more settings, limit the terms to the topic vocabulary only. (See configuring view fields in chapter 9.)
- Add a new view field content: updated date, and set the format to time ago with “ago” appended. (See configuring view fields.)
- Add view fields content: comment count, and the content: has new content fields. (See configuring view fields.)
- Edit the title field added by Views by default. Add a label title, to provide the related table column with a header. (See configuring view fields.)
- Remove any existing sort criteria and add a new, content: updated date, with sort order descending. (See configuring sorting in chapter 9.)
- Save the view.
Solution Video: