R4RIN
Articles
Java 8
MCQS
Drupal MCQ Quiz Hub
Drupal Mcq Questions Unit 4
Choose a topic to test your knowledge and improve your Drupal skills
1. Which of the following ways can you use to customize error pages for 404 and 403 errors?
Use the customerror module and its required modules
Create custom error pages for these errors, then specify the location of these error files in the admin settings.
Create custom error pages for these errors, then specify the location of these error files in the configuration file.
We can not customize error pages.
2. Drupal users are grouped into what?
User Groups
Ranks
Roles
Teams
3. Which of the following can be used to attach a library in twig template?
attach_library()
drupal_add_js()
drupal_add_library()
None of the above
4. Which of the following is the correct way to attach a library in a Drupal Module?
use ['#attached'] property
drupal_add_js() and drupal_add_library()
Both of the above
None of the above
5. Which file defines routes in a module?
module.routing
routing.module
module.routing.yml
module.info.yml
6. Which one of the following is the correct way to discover valid theme hook suggestions?
Install and enable Devel module
Enable Twig debugging mode
Write custom module
Enable Webprofiler module
7. To create our own Controller, we need to extend it from the following Controller Class:
BaseController
ControllerBase
Controller
ControlController
8. Which is the correct way to list all routes?
drupal router:debug
drupal router:all
drupal router:list-all
drupal route:all
9. Use the CCK module to add fields to your ________.
Nodes
Pages
Files
Modulars
10. In Drupal, the highest level of taxonomy description is _____________.
Vocabulary
Blog
Breadcrumbs
Modular
11. Which minimum PHP version is required to run Drupal 8.2?
PHP 5.3
PHP 5.4
PHP 5.5
PHP 5.6
12. Which of the following data storage types are provided by Configuration Management in Drupal?
Content Session State Configuration
Session State Configuration
Views Session State Configuration
Permissions Session State Configuration
13. Which statement is true?
Asset libraries are simple collections of CSS or JavaScript files
Asset libraries are simple collections of CSS files
Asset libraries are simple collections of JavaScript files
Asset libraries are simple collections of images
14. Which is the correct way to attach Libraries in THEME.info.yml?
ame: custom_theme type: theme description: Amazing Custom Theme package: Other core: 8.x libraries: - custom_theme/global-styling - custom_theme/views - custom_theme/header_footer
name: custom_theme type: theme description: Amazing Custom Theme package: Other core: 8.x libraries: custom_theme/global-styling custom_theme/views custom_theme/header_footer
name: custom_theme type: theme description: Amazing Custom Theme package: Other core: 8.x libraries: custom_theme/global-styling, custom_theme/views, custom_theme/header_footer
None of these
15. Which of the following modules are included in Drupal Core? (
Views
CKEditor
Breakpoint
All of the above
16. Which of the following files are required for creating a Drupal theme?
.info
themes.php
both (a) and (b)
None of these
17. Which of the following statements are valid for Field SQL Storage?
Field UI—allow you to create fields and attach them to content types, comments
Fields can be stored in different formats and formatted in different ways
Fields can not be stored in different formats and formatted in different pages
None of these
18. By default, Drupal provides the following roles:
Anonymous User
Authenticated User
Administrator
All of the above
19. Which of the following are properties of render array?
#type
#cache
#markup
All of the above
20. What Drupal feature is activated when a trigger is enabled?
Blocks
Hooks
Modules
Actions
21. Which of the following options are provided by Drupal to increase performance?
Aggregate JavaScript files
Aggregate CSS files
Views Caching
Both (A) and (B)
22. Which of the following is the correct way to print a variable in Twig?
{{ name_of_variable }}
{ name_of_variable }
{% name_of_vairable %}
{%% name_of_variable %%}
23. 25- Drupal has over ________ plugins to boost your website?
1000
2000
4000
5000
24. Which of the following controls content in sidebars?
Blog
Book
Dblog
Block
25. Among the following DB-place-holders, which one is not enclosed within single quotes?
Binary
Integer
Float
String
26. Drupal core is __ defining a system of __ and __?
hooks, Modular, callbacks
modular, hooks, callbacks
backend, hooks, callbacks
None of these
27. In custom module, routes are defined in:
MODULENAME.routing.yml
MODULENAME.info.yml
MODULENAME.routes.yml
MODULENAME.module
28. Which of the following is the correct way to remove whitespace between HTML tags in Twig template?
{% removespace %} <div class="code"> <strong>foo</strong> </div> {% endremovespace %}
{%- removeblanks -%} <div class="code"> <strong>foo</strong> </div> {%- endremoveblanks -%}
{%- removespace -%} <div class="code"> <strong>foo</strong> </div> {%- endremovespace -%}
{% spaceless %} <div class="code"> <strong>foo</strong> </div> {% endspaceless %}
29. CacheArray is in the process of being replaced by CacheCollector in ____?
Drupal 5
Drupal 6
Drupal 7
Drupal 8
30. What is the default location of the configuration sync directory?
DRUPALROOT/sites/default/config_LONG_HASH
DRUPALROOT/sites/default/files/private/config_LONG_HASH
DRUPALROOT/sites/default/files/private/config_LONG_HASH
DRUPALROOT/sites/default/files/config_LONG_HASH
31. What is a theme suggestion in Drupal theming?
Theme suggestions suggest to the Drupal admin how a theme will best look and it offers HTML, CSS, and Jquery.
Theme suggestions change the look of a specific node and they re-style views, blocks, and pages.
Theme suggestions suggest the best way to present a theme to the user.
Theme suggestions suggest which Drupal theme to download from Drupal.org
32. Which of the following permissions are defined by Configuration Manager:
Export configuration
Import configuration
Synchronize configuration
All of the above
33. Which of the following is correct to include CSS or DS files in a Drupal Module?
Save the CSS or DS to a file.
Define a "library", which can contain both CSS and JS files."Attach" the library to a render array in a hook.
Both A and B
Use add_js and add_cs function in module file
34. Which of the following is the correct way to display current key:value on settings file?
Authentication API
Block API
RESTful Web Services API
All of the above
Submit