Tables of attachments on comments

As site member posting a comment on a documentation page, I want to be able to attach files – just as I can when editing the documentation page. I want the attached files to be displayed in a table. This is important since file attachments are useful when discussing documentation.

How to Demo: 
  1. Log in to the site.
  2. Post a comment to a documentation page, attaching at least one file.
  3. Verify that the accepted file types are the same as when attaching files to documentation pages.
  4. Verify that the attached files are displayed in a table.
Required Preparations: 
  • The site should have a documentation page content type, as provided by the first exercise in this suite.
Additional Comments: 
  • Since the user story explicitly says that files should be managed in the same way on comments as on documentation pages, it may be a good idea to reuse the field rather than create a new one. Still – while creating a new field takes a few more minutes, it may save you many hours of work later on.
  • Since the client seems interested in using attachments in the same way in both documentation pages and their comments, it is probably a good idea to display files as tables on the node as well.
Modules: 
Downloads: 
AttachmentSize
6.21 KB
Suggested Solution: 
  1. Go to the tab comment fields for the documentation page node type. (See comment and user fields in the fields chapter.) 2 Add the existing field – the attachment field used on documentation page nodes. Set the configuration identical to how it is used in the documentation page node type. (See reusing fields in the fields chapter.) 3 Go to the tab comment display. Set the format for the attachment field to table of files and hide the label. (See field display settings in chapter 7.)
Solution Video: