I am new to Drupal and Would really appreciate the help

I am importing html pages using migrate, migrate_tools, migrate_plus and migrate_source_html it is working but I would like to also populate the Menu settings with the following Menu link title, Description, Parent link, the parent is not the main it should be something like 'test' which I created Menus

I also would like to populate the Taxonomy in the Tags 'Entity reference Reference type: Taxonomy term Vocabulary: Tags' which is in the meta of the html page

This is my YML file note the url is not right here but I have the real URL in my code and the pages gets migrated to my content

label: migrate html
  plugin: url
  vocabulary: internal
    - https://url/modules/custom/cfa_migrate_html_content/pages/page.html
  data_fetcher_plugin: http
  data_parser_plugin: html5
    - name: content_id
      label: 'Content ID'
      selector: '//head/meta[@property="post_id"]/@content'
    - name: title
      lable: 'Content Title'
      selector: '//title/text()'
    - name: content
      lable: 'Content'
      selector: '//body/*'
    - name: taxonomy
      lable: 'taxonomy'
      selector: '//head/meta[@property="taxonomy_id"]/@content'
    - name: parent_menu_id
      lable: 'parent_menu_id'
      selector: '//head/meta[@property="parent_menu_id"]/@content'
      type: integer
  title: title
        plugin: dom
        method: import
        source: 'content'
        plugin: dom
        method: export
    plugin: default_value
    default_value: full_html
    plugin: default_value
    default_value: 1
    plugin: default_value
    default_value: article
  path/alias: default_value
  default_value: /content/html-5-
  plugin: 'entity:node'
  bundle: migrated_content
This is my html page 
```<!doctype html>
<meta charset="UTF-8">
<meta property="post_id" content="24012">
    <meta property="taxonomy_id" content="Organization">
    <meta property="parent_menu_id" content="1">
<body class="content">
        <li> <a href = "/internal/Employees.html"> Employees</a> </li>
        <li> <a href = "/opportunities/index.html" target = "blank"> opportunities</a> </li>
        <li> <a href = "science"> Sciene</a> </li>

I tried the following in my YML for the taxonomy

    plugin: entity_lookup
    source: taxonomy
    value_key: name
    bundle_key: vid
    bundle: content_categories
    entity_type: taxonomy_term
    ignore_case: true

and it does not work, nothing shows up in the tags and I am not sure what the code should be for the menu.

Any help would be great and thank you so much in advance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.