d7_block.yml

Same filename and directory in other branches
  1. 9 core/modules/block/migrations/d7_block.yml
  2. 8.9.x core/modules/block/migrations/d7_block.yml
  3. 10 core/modules/block/migrations/d7_block.yml
core/modules/block/migrations/d7_block.yml

File

core/modules/block/migrations/d7_block.yml

View source
  1. # cspell:ignore firstcolumn secondcolumn thirdcolumn fourthcolumn
  2. id: d7_block
  3. label: Blocks
  4. # This configuration migration depends on the d7_custom_block content migration.
  5. migration_tags:
  6. - Drupal 7
  7. - Configuration
  8. source:
  9. plugin: block
  10. process:
  11. # Block status is not a thing in Drupal 8, so this is how we skip over
  12. # disabled blocks.
  13. status:
  14. plugin: skip_on_empty
  15. method: row
  16. source: status
  17. id:
  18. -
  19. plugin: concat
  20. source:
  21. - theme
  22. - module
  23. - delta
  24. delimiter: _
  25. -
  26. plugin: machine_name
  27. field: id
  28. _block_module_plugin_id:
  29. -
  30. plugin: static_map
  31. source:
  32. - module
  33. map:
  34. block: block
  35. default_value: ''
  36. -
  37. plugin: skip_on_empty
  38. method: process
  39. -
  40. plugin: migration_lookup
  41. migration:
  42. - d7_custom_block
  43. source:
  44. - delta
  45. plugin:
  46. -
  47. plugin: static_map
  48. bypass: true
  49. source:
  50. - module
  51. - delta
  52. map:
  53. book:
  54. navigation: book_navigation
  55. comment:
  56. recent: views_block:comments_recent-block_1
  57. forum:
  58. active: forum_active_block
  59. new: forum_new_block
  60. # locale:
  61. # 0: language_block
  62. search:
  63. form: search_form_block
  64. statistics:
  65. popular: statistics_popular_block
  66. system:
  67. main: system_main_block
  68. 'powered-by': system_powered_by_block
  69. user:
  70. login: user_login_block
  71. # 1: system_menu_block:tools
  72. new: views_block:who_s_new-block_1
  73. online: views_block:who_s_online-who_s_online_block
  74. -
  75. plugin: block_plugin_id
  76. -
  77. plugin: skip_on_empty
  78. method: row
  79. theme:
  80. plugin: block_theme
  81. source:
  82. - theme
  83. - default_theme
  84. - admin_theme
  85. region:
  86. plugin: block_region
  87. source:
  88. - theme
  89. - '@theme'
  90. - region
  91. map:
  92. bartik:
  93. # Bartik 7.x --> Olivero 9.4.x
  94. olivero:
  95. featured: highlighted
  96. triptych_first: content_below
  97. triptych_middle: content_below
  98. triptych_last: content_below
  99. footer_firstcolumn: footer_top
  100. footer_secondcolumn: footer_top
  101. footer_thirdcolumn: footer_top
  102. footer_fourthcolumn: footer_top
  103. footer: footer_bottom
  104. seven:
  105. # Seven 7.x --> Claro 9.4.x
  106. claro:
  107. header: 'header'
  108. pre_content: 'pre_content'
  109. breadcrumb: 'breadcrumb'
  110. highlighted: 'highlighted'
  111. help: 'help'
  112. content: 'content'
  113. page_top: 'page_top'
  114. page_bottom: 'page_bottom'
  115. sidebar_first: 'sidebar_first'
  116. # If mapping fails, put the block in the content region.
  117. default_value: content
  118. weight:
  119. -
  120. plugin: get
  121. source: weight
  122. -
  123. # Block weights must be integers.
  124. plugin: callback
  125. callable: intval
  126. settings:
  127. plugin: block_settings
  128. source:
  129. - '@plugin'
  130. - delta
  131. - settings
  132. - title
  133. _role_ids:
  134. plugin: roles_lookup
  135. migration: d7_user_role
  136. visibility:
  137. plugin: block_visibility
  138. source:
  139. - visibility
  140. - pages
  141. - roles
  142. # If the block uses PHP visibility, don't migrate it unless the PHP module
  143. # is enabled.
  144. skip_php: true
  145. destination:
  146. plugin: entity:block
  147. migration_dependencies:
  148. optional:
  149. - d7_custom_block
  150. - d7_user_role

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.