drupalorg_migrate-1.0.x-dev/migrations/drupalorg_migrate_page.yml
migrations/drupalorg_migrate_page.yml
id: drupalorg_migrate_page
label: 'Drupal.org Page'
migration_group: drupalorg_migrate
# Commenting out the below will require the d7_file migration.
#migration_tags:
# - Drupal 7
# - Content
#deriver: Drupal\node\Plugin\migrate\D7NodeDeriver
source:
plugin: d7_node
batch_size: 1000
track_changes: true
node_type: page
destination:
plugin: entity:node
process:
nid: tnid
type:
plugin: default_value
default_value: page
langcode:
plugin: default_value
source: language
default_value: "und"
title: title
uid:
plugin: migration_lookup
migration: drupalorg_migrate_users
source: node_uid
status: status
created: created
changed: changed
promote: promote
sticky: sticky
body: body
upload:
plugin: sub_process
source: upload
process:
target_id:
plugin: migration_lookup
migration:
- drupalorg_migrate_page_upload_media_images
- drupalorg_migrate_page_upload_media_documents
source: fid
# 1. Use our custom callback function to get the Group NID from the source DB.
_og_group_nid:
plugin: callback
callable: drupalorg_migrate_get_og_group_nid
source: nid
# 2. Use the static map to translate the Group NID to the Section TID.
# If a mapping is not found, the value will be null.
field_section:
plugin: callback
callable: drupalorg_migrate_get_field_section_by_map
source: '@_og_group_nid'
migration_dependencies:
optional:
- drupalorg_migrate_users
- drupalorg_migrate_page_upload_media_documents
- drupalorg_migrate_page_upload_media_images
dependencies:
enforced:
module:
- drupalorg_migrate
