Build a Better Document Library in Drupal: Revisions, Dynamic Paths, and Unbroken Links

Slides: https://docs.google.com/presentation/d/1BFPsHUPlnYEd_-ymTEg3bHvKPlJQ2tRVvr6oz74xnzE/edit?usp=sharing

Imagine this scenario. You need to update a PDF on your Drupal website named "document.pdf" and there are hundreds of pages that link to the document at /sites/default/files/document.pdf (there may also be inbound links that you can't control).

You try uploading the new version by editing the Media through Drupal's admin interface. Unfortunately, you quickly realize that Drupal adds an "_0" to the filename and uploads the new document to "/sites/default/files/document_0.pdf".

Further, you realize that the old version is still accessible by the public at "/sites/default/files/document.pdf".

What do you do? You could use FTP to overwrite the old document, but then why even have a Content Management System in the first place?

What if you need to maintain revision history for the old document for traceability? You could try to update all links across hundreds of pages or maybe add a redirect to the new version. But even then, the old version remains public and could be viewed/downloaded if someone has the old URL.

There is a better way. This session will cover a Document Library methodology designed to improve Drupal's document handling, revision control, security, and avoid broken links.

Originally crafted for the Texas Education Agency (tea.texas.gov) and later implemented across numerous sites, including the City of Colorado Springs (coloradosprings.gov), the National Security Archive at GWU (nsarchive.gwu.edu), and Black Hills Energy Services (blackhillsenergyservices.com), this approach has become our default configuration at Monarch Digital for new Drupal websites.

Participants will learn how to implement this methodology utilizing Drupal's private filesystem, media entities and revisions, and document folders using taxonomy, aliases and Pathauto.

Whether you're handling educational resources, city records, or other critical documents, this session will equip you with the tools and knowledge to implement a better Document Library in Drupal.

Caleb Thorne
Support Manager, Monarch Digital

https://drupal-govcon-2024.sessionize.com/session/693730

Drupal is a registered trademark of Dries Buytaert.