Loading patterns with GPM

With Git Package Management (GPM) installed, you can attach all the files inside the pattern library directly to MODX as static files. This means that any edits inside the romanesco-patterns repository will be reflected in your installation immediately. No need to update Romanesco first and merge that update into your install. It's a shortcut for your development workflow, but beware of limitations and possible build conflicts!

When adding the romanesco-patterns repository with GPM, there's a few things to take note of:

  • By default, the config field in the git_packages table is too small for the pattern library package. You need to set this to MEDIUMTEXT first, otherwise you will get an error at some point saying the package can't be updated because you changed its name.
  • If you install the package inside a cloned Romanesco Soil installation, the installer will throw a lot of errors. You can ignore these. This is mainly because the elements already exists, but the purpose of installing the patterns through GPM is to edit and update them directly (instead of having to update Soil every time).
  • In case you already have the romanesco namespace present in your installation, remove it first before installing the package. Otherwise, it won't add the correct paths for GPM to the namespace.
  • I've experienced the Romanesco system settings being wiped after package install. Running a gitify build after GPM package install put them back in place, and you can safely update the package after that again (needed to make the assets static).
  • The installer can take a long time, so make sure timeouts on your server are set to a forgiving value.
  • If you use Romanesco TVs in any of your custom templates, you need to restore their template assignments after each GPM package update. This is because GPM only attaches any TVs to the templates assigned in the config files. Theme overrides are included still, but your custom templates won't be there. I found that the best way to restore the correct assignments is to run the templates_assignment part inside .gitify again. I isolated this file into .gitify.gpm, so you can replace your .gitify temporarily with that one until your GPM updates are done. Not exactly ideal, but worth the price of not having to duplicate all the core TVs (and possibly chunk tpls too).

Loading backyard package

Attention: outdated information!

Backyard resources are now installed using Gitify.

You can add the romanesco-backyard package in the same way, but keep an eye on this:

  • When attempting to install romanesco-backyard with GPM in an installation with existing resources, it's not uncommon to end up with an unresponsive installer. This is probably because some of the resources inside the Backyard package already exist in the tree. On way around this is to delete those resources first, but if you previously installed the regular Backyard package, try copying the resourcemap.php file from assets/components/romanescobackyard to packages/gpm/assets/components/gitpackagemanagement/packages/romanescobackyard/.
  • Another way to circumvent issues is to add both the row for the RomanescoBackyard in git_packages and the namespace manually. Then you can choose to update the package instead from the grid. Use a resource map if you want to keep existing pages!
  • Sometimes you need to update the Backyard package a couple of times from the GPM grid in order to create some resources on deeper levels, and to nest them properly in the tree.