We need to create a companion module for our theme because Drupal has decided that themes can only contain presentation layer and not logic such as block types. Since we need block types for our frontpage implementation, we need a module for that code to live in.
This PR does the following:
Move the current theme into a subdirectory in the current repo leaving the composer.json where it is.
Create a new subdirectory containing the companion module
Setup dependencies so that the theme depends on the module
Setup composer so that each subdirectory is it's own package and the root is a metapackage that requires/installs both
Update associated dockerfile
Testing
Clone this repo and checkout this branch
Build a new image from this code: docker build --tag=trpcultivate:11 --build-arg drupalversion=10.2.x-dev --build-arg phpversion=8.3 ./
Run a new container (no need to mount when confirming functionality; for instructions on mounting see the README): docker run --publish=80:80 -tid --name=theme11 trpcultivate:11 && docker exec theme11 service postgresql restart
Load the frontpage by going to localhost and confirm that it shows the current theme enabled.
Go to the appearance page and ensure that the theme is enabled and states the companion module as a dependency (see screenshot)
Go to the module page and ensure the companion module is present and enabled (see screenshot)
We need to create a companion module for our theme because Drupal has decided that themes can only contain presentation layer and not logic such as block types. Since we need block types for our frontpage implementation, we need a module for that code to live in.
This PR does the following:
Testing
docker build --tag=trpcultivate:11 --build-arg drupalversion=10.2.x-dev --build-arg phpversion=8.3 ./
docker run --publish=80:80 -tid --name=theme11 trpcultivate:11 && docker exec theme11 service postgresql restart