D7 -> D8 Conversion
Converting D7 structures to D8
Process for creating component modules:
Login to the website and go to the paragraphs admin page (
/admin/structure/paragraphs_type
) and delete the paragraph you want to work onStep 1 above may delete some of the field.storage dependencies (field definitions), so just re-import all the bos_component module config to make sure you get all the shared config back into the database:
lando drush config-import --partial --source=/app/docroot/modules/custom/bos_components/config/install
Create the module scaffolding using drush, for example:
lando drush componetize bos_discussion_topic --components=discussion_topic
Add hook_theme() to .module file to connect to the paragraph template
Copy the corresponding paragraph template from
boston.gov-d8/docroot/themes/preConversion/component
and put it in the scaffolding that the drush command from step 3 created:docroot/modules/custom/bos_components/modules/bos_discussion_topic/templates
Enable the module:
lando drush en bos_discussion_topic
In the Drupal UI, add the new bundle to the
field_components
paragraph types list for the Test Component Page content type:/admin/structure/types/manage/test_component_page/fields/node.test_component_page.field_components
Create a test page with the component added to review admin UI and display
Other helpful commands:
Importing a single config file:
Exporting database config directly to your module (Important: the config file needs to be referenced in your module's info file under the
config-devel
key):lando drush config-devel-export bos_cabinet
Last updated