Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Oleksandr Medvediev - Content delivery tools in Drupal 8.

60 visualizaciones

Publicado el

Content delivery tools in Drupal 8.

Publicado en: Tecnología
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Oleksandr Medvediev - Content delivery tools in Drupal 8.

  1. 1. Drupal 8: content delivery tools Oleksandr Medvediev
  2. 2. Oleksandr Medvediev Drupal developer in ImageX > 7 years in Drupal. https://github.com/SanyokMedved https://www.facebook.com/sanyok.medved https://www.linkedin.com/in/medvedevalexandr
  3. 3. Reasons
  4. 4. Reasons
  5. 5. Agenda Approaches to deal with content delivery • Default Content • Migrate • Feeds • Deploy • Other tools
  6. 6. Default Content Default content gives your module and install profile a way to ship default content as well as configuration. https://www.drupal.org/project/default_content What can be done with it? • Creating content using Drupal interface. • Saving content into JSON files by entity type, entity id or as nodes with references. • Exporting content without writing excessive custom code. • Using “drush only” way to export created content.
  7. 7. Default Content - pros and cons Pros • For creating content user doesn’t need any programming skills. • Using standard Drupal interface and tools. Results can be seen right after publishing. • Very simple workflow. • Minimum custom code. • Saving referenced entities. Cons • Saving content in files in codebase as part of custom module. • Creating of duplicates of entities if custom module is enabled again. • Exported files with content are not user-friendly (JSON/HAL). • Nodes can’t be exported by bundle. • Content can’t be rolled back.
  8. 8. Default Content. How to use? Export single entity $ drush default-content-export node 11 $ drush dce node 11 $ drush dce taxonomy_term 2 — file=modules/custom/demo_module/content/taxonomy_te rm/2.json
  9. 9. Default Content - Export referenced content Exports an entity and all its referenced entities $ drush default-content-export-references node 123 $ drush dcer node 123 $ drush dcer node 123 — folder=modules/custom/demo_module/content
  10. 10. Default Content - Structure of custom module
  11. 11. Default Content - Additional modules Default Content Deploy This module (DCD) provides content deployment and allows development and building sites without the need to transfer database between the sites. $ drush dcdi —force-update
  12. 12. Default Content - Additional modules Default content extra Default Content Extra is a Drupal 8 only module that adds "extra", experimental functionality to the Default Content for D8 module "path": { "alias": “/my_awesome_path” }
  13. 13. Drupal 8 Migrate The Migrate API provides services for migrating data from a source system to Drupal 8.
  14. 14. Drupal 8 Migrate - migration example
  15. 15. Drupal 8: Deploy - Content Staging The Deploy module is designed to allow users to easily stage and preview content for a Drupal site. Deploy automatically manages dependencies between entities (like node references).
  16. 16. Drupal 8 - module Deploy
  17. 17. Drupal 8 - Deploy. How to use? 1.Enable Moderation on your Workspaces. 2.Add/Edit content in the Stage workspace. 3.Publish the Stage Workspace. 4.Content gets replicates to the Live Workspace.
  18. 18. Drupal 8 - Deploy. How it works?
  19. 19. Drupal 8 - Deploy. How it works?
  20. 20. Drupal 8 - Feeds https://www.drupal.org/project/feeds What can we done with it? • One-off imports and periodic aggregation of content. • Import or aggregate RSS/Atom feeds. • Import or aggregate CSV files. • Import or aggregate OPML files. • Creating nodes, users, taxonomy terms or simple database records from import. • Granular mapping of input elements to Drupal content elements. • Exportable configurations. • Batched import for large files.
  21. 21. Drupal 8 - Feeds roadmap. Current version - 8.x-3.0-alpha2. Feeds 8.x roadmap: • Investigate if Migrate components can be used in Feeds. • Have an usable CSV parser, an usable XML parser and a working Feeds Tamper module with at least one Tamper plugin. • Support for huge data files. • Chained imports. • Rollback imports. • Keep same content ids as in the source. • Analytic report of import process.
  22. 22. Drupal 8 - Other tools Recreate block content - (https://www.drupal.org/project/recreate_block_content) Fixed Block Content - https://www.drupal.org/project/fixed_block_content Simple block - https://www.drupal.org/project/simple_block Custom module
  23. 23. Summary 1. Analyze your task, define the aim and chose suitable tools and workflow for it. 1. Less code solutions: Default Content, Deploy, Feeds. 1. Solutions requiring code: Migrate, Custom solutions. 1. One time operation, quick content preview, prototype, feature testing with required content - Default content. 1. Content import on regular bases - Migration. 1. Additional content moderation workflow and different access levels to it - Deploy content staging.
  24. 24. Questions?
  25. 25. Thank you for attention!

×