Tome Module: Creating a Static Page from a Drupal Site
When designing, developing, and migrating a large county site that incorporates more than 40 separate sites into one Drupal codebase using core muti-site features, it can be expected that some individual site owners will have particular requirements that pose distinct challenges.
One such condition emerged for us at Promet Source earlier this year during a Drupal migration project for the Orange County, Calif., website.
The OC Animal Care site needed to use the new Drupal multisite platform for their main site, but they managed an external non-Drupal site as well, that they heavily link to for pet adoptions in Orange County. This site needed to remain on its existing server, and not migrate over to the Drupal CMS platform that Orange County’s other sites were moving onto.
A consistent aesthetic and user experience was an essential objective for all of the Orange County properties. Promet had designed a coherent style and navigation menus for the Orange County websites, and allowing one of the sites to appear as an outlier with different navigation and an unrelated look and feel was far from optimal.
On the other hand, requiring the owners of the external pet adoption site to redo their site to mimic the headers, footers, navigation and design style of the new Orange County site would have required dozens of costly developer hours for another firm, without a guarantee that this external site would have would ended up with a user experience that effectively aligned with the OC Animal Care main site or the other 40 Orange County sites.
The Tome module proved to be the solution.
How We Used the Tome Module
Tome at Work
In addition to vastly simplifying development, use of the Tome module has established a framework that will streamline management of this static site template moving forward. Any time that OC Animal Care site owners need to get the latest menu from the OC Animal Care site and reload it over to the OC Animal Care Pet Adoption site, a few clicks are all that will be needed to create an updated Zip file.
The users simply login to the OC Animal Care site, go to a menu item available to admins and click a button to have the site build out this new Zip file.
Effectively using the Tome module for our purposes developmentally was simply a matter of:
- Creating a new route that would display an empty page;
- Creating a new custom Tome download and export command that extended the default commands to only save this one new custom empty page to the static directory; and
- Altering the export process a bit to fix a few small issues we had with making sure the links and images and css were all relative to our static file structure and displaying correctly.
Most often, the Tome module is leveraged to migrate an entire dynamic site onto a static site. The Orange County migration posed a slightly different challenge with the need to seamlessly incorporate one static site into a dynamic, 41-site Drupal CMS, without any disruption to the user experience or design language.
Looking to leverage the vast array of Drupal capabilities to meet a complex objective for your website? That’s what we do! Let us know how we can help.