Drupal Technology & Digital Applications 3 — Questions and Answers
Question 1: What is Drupal's 'Configuration Management' system primarily used for?
- Storing user-generated content
- Exporting and importing site configuration between environments (Correct answer)
- Managing server PHP settings
- Controlling database connection strings
Correct answer: Exporting and importing site configuration between environments
Drupal's Configuration Management system allows developers to export site configuration (content types, views, etc.) as YAML files and import them into other environments, ensuring consistency.
Question 2: In Drupal's theming system, what is the purpose of a 'preprocess function'?
- To compile SASS into CSS
- To manipulate variables before they are passed to a Twig template (Correct answer)
- To register new theme hooks
- To minify JavaScript files
Correct answer: To manipulate variables before they are passed to a Twig template
Preprocess functions (e.g., `hook_preprocess_node()`) allow modules and themes to modify the variables available to a Twig template before it renders.
Question 3: Which Drupal feature allows content to be scheduled for automatic publishing at a future date?
- Content Moderation (core)
- Scheduler (contributed module) (Correct answer)
- Workflow (core)
- Publish at (contributed module)
Correct answer: Scheduler (contributed module)
The Scheduler contributed module allows editors to set a future publish date and time on content, which is then published automatically when cron runs.
Question 4: What is the function of Drupal's 'Layout Builder' module?
- To generate responsive CSS grid code
- To let editors arrange content blocks visually on individual pages or content types (Correct answer)
- To build database schemas visually
- To manage menu link hierarchies
Correct answer: To let editors arrange content blocks visually on individual pages or content types
Layout Builder provides a drag-and-drop interface for site builders and editors to control the layout of content pages at both the content-type and individual node level.
Question 5: In Drupal, what does the acronym 'ECA' stand for in the context of workflow automation?
- Entity Content API
- Event Condition Action (Correct answer)
- Extended Cache Architecture
- External Content Aggregator
Correct answer: Event Condition Action
ECA (Event Condition Action) is a contributed Drupal module that provides a no-code/low-code rules engine for automating site workflows based on triggers and conditions.
Question 6: What Drupal mechanism allows one module to alter data or behavior defined by another module?
- Plugins
- Services
- Hook implementations (alter hooks) (Correct answer)
- Event subscribers
Correct answer: Hook implementations (alter hooks)
Alter hooks (functions ending in `_alter()`) allow modules to modify data structures, forms, or other information defined by other modules before they are used.
Question 7: Which Drupal technology provides real-time notifications to browsers without requiring the page to reload?
- BigPipe
- Mercure (via contributed modules) (Correct answer)
- Twig extensions
- Aggregated CSS/JS
Correct answer: Mercure (via contributed modules)
The Mercure protocol, integrated via contributed Drupal modules, enables real-time push notifications to browsers using Server-Sent Events for live content updates.
What is Drupal's 'Configuration Management' system primarily used for?