Quiz
FRONT END DEVELOPER POOL-1 (MAGENTO 2 CERTIFIED PROFESSIONAL)
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (40)
1You are building MyCompany/MyTheme and need to customize the header template. Where do you place the new phtml template to override the header?
- AMyCompany/MyTheme/templates/html/header.phtml
- BMyCompany/MyTheme/Magento_Theme/html/header.phtml
- CMyCompany/MyTheme/Magento_Theme/templates/html/header.phtml
- DMyCompany/MyTheme/Magento_Theme/templates/override/html/header.phtml
2What is true regarding the differences between the define and require functions?(2)
- Adefine is passive and only runs when it is called.
- Brequire is always run (as long as the module's file is loaded).
- Cdefine is an application's entry point. This is what should be used in a phtml template.
- Drequire is a dependency of the application and a error will result if this module is missing.
3You are making some major modifications to the customer account page. These modifications mean that you are unable to use the original layout instructions for this page. In what file do you place your custom layout instructions?
- Aapp/design/frontend/MyCompany/MyTheme/layout/customer_account_index.xml
- Bapp/design/frontend/MyCompany/MyTheme/Magento_Customer/layout/customer_account_index.xml
- Capp/design/frontend/MyCompany/MyTheme/Magento_Customer/layout/override/frontend/customer_account_index.xml
- Dapp/design/frontend/MyCompany/MyTheme/Magento_Customer/customer_account_index.xml
4You are browsing the Magento_Catalog's widget file and see this:
<widget id="new_products" class="Magento\Catalog\Block\Product\Widget\NewWidget">
<parameters> <!-- ... --> </parameters> <containers> <container name="sidebar.additional">
<template name="default" value="list_default" /> <template name="names_only" value="list_names" />
<template name="images_only" value="list_images" />
</container>
</containers>
</widget>
What is the purpose of the template nodes?- AIt filters options for the template when the widget is inserted into a page's layout.
- BIt sets a data value on the block when it is used in a CMS page or block.
- CIt adds a new option to the widget configuration area.
- DIt creates new templates when the widget is used in a container.
5How do you locate strings to be translated a custom module.
- AEnable inline translation in Stores > Configuration
- Bbin/magento i18n:collect-phrases
- Cgrep your module for __\(['"].*?['"]\)
- DOpen the admin panel's Content > Translation Wizard.
6What command symlinks files from a module or the var/view_preprocessed directories to their respective location in pub/static?
- Abin/magento dev:source-theme:deploy
- Bbin/magento indexer:reindex
- Cbin/magento setup:static-content:deploy
- Dbin/magento setup:di:compile
7On the catalog product page, this XML instruction is executed:
<block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="Magento_Catalog::product/view/review.phtml" after="product.info.stock.sku"/> You have created MyCompany_MyModule which needs to utilize your own version of review.phtml. What layout XML instruction do you use to accomplish this?- A<referenceBlock name="product.info.review" template="MyCompany_MyModule::new-review.phtml"/>
- B<referenceBlock name="product.info.review">
<action method="setTemplate"><template>MyCompany_MyModule::new-review.phtml</template></action>
</referenceBlock> - C<referenceBlock name="product.info.review">
<parameters>
<argument name="template" xsi:type="string">MyCompany_MyModule::new-review.phtml</argument>
</parameters>
</referenceBlock> - D<referenceBlock name="product.info.review" remove="true"/>
<block name="product.info.review" template="MyCompany_MyModule::new-review.phtml"/>
8Magento 2 Themes use a combination of ------ to achieve the desired look(Fill in gap)
- APHP,HTML & XML
- BXML, CSS & HTML
- CCSS and JavaScript
- DHTML, JavaScript & CSS
- EAll
9Where Composer-based themes can be stored ?
- Aapp/design/frontend/<vendor>/<theme> /
- Bm2-root/vendor/
- Capp/code/<vendor>/<module>/
- DAnywhere
- ENowhere
10You are building a module that will be sold on Magento Marketplace . This module adds significant functionality is meant as a foundation for building extra functionality & u need to provide developers with a way to easily add additional style. How do you do this?
- AIn your _module.less file , add //@magento_import source/_foundation.less'; This will include all _foundation.less files into your module's _module.less
- BThe _extends.less with an S at the end within the Blank Theme, is a file where they created all the classes that can be extended via LESS later within the theme, without the need of creating new components or modular structure for style changes
- CIn your _modules.less file , Add @import 'source/_foundation.less'; .Magento has extentded the @import directive to search all modules
- DIn view/web/css/source/includes.xml add: <includeAll>_foundation.less<includeAll>
- EYou need to utilize the Assuilder class to compile other module's LESS files.
11You see this <script/> in the source on a page:
{ "*": {"MyCompany_MyModule/js/modal": {} } }
What is the effect of the asterisk (*)?- AThe asterisk means that this module is not initialized with an associated element.
- BThe asterisk means that this module is initialized with an associated element.
- CThe asterisk is a typo & should be a dash (-)
- DThe asterisk means that this module is initialize for each element on the page
- EThe asterisk means that the module is initialized once for each root element
12You are building a jQuery widget that renders this text : Welcome, %s! . How do you translate this?
- ARequire mage/translate as $t , then : $t('Welcome, %s ').replace('%s', name)
- BRequire magento/translate as $t , then : $t('Welcome, %s ').replace('%s', name)
- C_('Welcome, %s!', name);
- DRequire mage/translate as $t , then : $t('Welcome, %s ', name)
- ECreate a translation.json in view/web/js . Then , require MyCompany_MyModule/translation.json & parse the JSON
13Your reviewing a Magento 2 build that another company developed , before the website goes live. In this process, you notice that while the original page load quickly ( and you see unformatted text & images ), it takes several seconds for the text & images to become styled. What is the solution ?
- ASwitch the LESS compilation mode from Client-side to Server-side
- BSwitch the SASS compilation mode from Client-side to Server-side
- CSwitch the CSS compilation mode from Client-side to Server-side
- DSwitch the JS compilation mode from Client-side to Server-side
14You have been tasked with configuring a new setting in Content> Design. Where are the values saved that are set in this panel?
- Acore_config_data
- Betc/system.xml
- Cetc/config.xml
- Ddesign_change
- Etheme_confiquration
15u r customizing the display of particular product. On this page u need to change the container in which the product option appear. Keeping ,maintainability in mind , how do u do this?
- AIn the product admin page , choose the correct option in the "Display Product Option in" drop-down list
- BIn the category that the product is associated with , choose the correct option in the "Product Options Container" dropdown
- CThis is only possible with a layout XML update
- DIn the product's admin page, change the Layout to be "2 columns with right bar"
16U'v built a module: MyCompany_ProductEnhancements. ThirdParty_ProductModifier already exists in installation. u need to change a data variable set in <arguments> node . However, that change is not taking effect: it continues as value set by ThirdParty_SalesTax. How do u solve this problem?
- AMake MyCompany_ProductEnhancements dependent on ThirdParty_ProductUpdates
- BCopy the layout instructions from ThirdParty_ProductEnhancements into MyCompany_MyModule
- CMake ThirdParty_ProductUpdates depend on MyCompany_ProductEnhancements
- DCreate a new layout XML file in MyCompany_ProductEnhancements layout/modifier directory
17Magento contains the following layout instructions: <head><css src="css/styles-m.css"> <css src="css/style-l.css" meadia="screen and (min-width:768px)"> </head>. However, styles-m.css generated? How is styles-m.css generated?
- AMagento replace the .css files extension with .less & searches for styles-m.less in the web/css directory.
- BThe Less preprocessor looks for all LESS files that match styles-m.less in the app/design/frontend directory
- CMagento automaticaly create styles-m.less which contain references to the other LESS files to be iported
- DThe association of styles-m.less & sstyles-m.css is in a constant array it is always rendered
18You Have been tasked with making a couple of small style modification in the Magento Luma Theme. Keeping upgrade-ability in mind, where do you add these changes?
- Asource/_extend.less
- Bsource/_extends.less
- CAdd another stylesheet into the <head> tag
- Dsource/_module.less
19u r creating a JS module that applies the magento accordion UI widget to an element . You have written this code: require(['jquery','accordion', ], function ($ , accordion){ var accordionWigdget = $ ("#accordion"). accordion(); }); How do u call method on the accordion after it has been initialized?
- A$("#accordion").accordion("activate");
- B$("#accordion").callWidgetMethod("accordion","activate");
- C$("#accordion").accordion.activate();
- D$("#accordion").accordion().activate();
20What module initializes uiComponents?
- AMagento_Ui/js/core/app
- Bui_component
- Cko/ui_component
- DMagento_Theme/js/ui_component
21What are differences between a container & a Block?(select 3)
- AContainers automatically render their children
- Bcontainer can render an HTML tag that surrounds child elements
- CBlock render text or html
- DBlocks can only be placed inside containers
- EOnly blocks render HTML
22Magento provides a polyfill for ES6's string templates feature. This utilizes the syntax: ${}. What are valid values to be evaluated? (2)
- A$ { $.e1 }
- B$ { 1+1 }
- C${ bind:template }
- D${ this.value }
23How do you configure a uiComponent on the frontend with layout XML?
- A<block name="my.block.name template="MyModule_MyCompany::block.phtml">
<arguments> <argument name="jsLayout" xsi:type="array"><!---Config here-->
</argument> </arguments> </block> - B<block name="my.block.name template="MyModule_MyCompany::block.phtml">
<arguments> <argument name="cssLayout" xsi:type="array"><!---Config here-->
</argument> </arguments> </block> - C<referenceBlock name="ui.components" >
<add name="new.component">
<!---Config here-->
<referenceBlock> - D<block name="my.blcok.name" template="MyModule_MyCompany::block.phtml">
<ui_component>
<!---Config here-->
</ui_component>
</block> - E<ui_component name = "conponent_name"/> Then , add configuration in
ui_component/component_name.xml
- A<block name="my.block.name template="MyModule_MyCompany::block.phtml">
24When you override an existing template using design fallback directories, what are potential problems? (2)
- AIf the theme that contains the overriding template is not utilized for the website, the template will not be used
- BWhen original template is upgraded , it is easy to miss that the overriding template needs to be updated
- CIf there is an error the new template file , the old one will be rendered
- DIf the store configuration , design/templates/allow_symlinks == false , the overriding template will not be rendered
25You have configured a new block in Layout XML with this code:
<block name ="my.block" template="MyCompany_MyModule::myTemplate.phtml"> <argument name="test_value" xsi:type="number">1000<argument> <argument> </arguments> </block> (2)- A<?=block->test_value ?>
- B<?= $block->getTestValue; ?>
- C<?= $block->getTestData; ?>
- D<?= $block->getTestArg; ?>
26ur creating a custom theme(MyCompany/MyTheme) that inherits ModuleVendor>BeautifulTheme. This inherite the Magento Blank theme. I what order will be the Magento fallback mechanism look for files?
- AMyCompany/MyModule >ModuleVendor/BeautifulTheme>Magento/Blank>Module
- BMyCompany/MyTheme >MyThemeVendor/BeautifulTheme>Magento/Blank>MyTheme
- CMyCompany/MyModule>Module
- DMyCompany/MyModule >ModuleVendor/BeautifulTheme>Module
27u need to achieve this output fro a container:
<div class="product_view"> <!--content goes here--> </div> What attributes do you use on the <container/> layout instruction to achieve this? (2)- AhtmlTag="div"
- BhtmlClass="product__view"
- ChtmlTag="Class"
28Themes provide customization options in etc/view.xml. You are writing a PHTML template that will utilize configuration in this file. In your templete, how do you load a value from etc/view.xml ?
- A<?= $block->getVar("image_width",Magento_Catalog");?>
- B<?= $block->getScopeConfig()->getValue('theme/Magento_Catalog/image_width'); ?>
- C<?= $block->getData('theme_Magento_Catalog_image_width'); ?>
- D<?php
$objectManager= \Magento\Framework\App\objectManager::getInstance();
$configuration =$objectManager->create('\Magento\Framework\Theme\Model\Configuration');
echo $configuration->getValue(Magento_Catalog/image_width);
?>
29ur needing to add some extra spaces into the rendering of a customer's address. Keeping maintainability in mind , where do you make this change?
- AStore>Configuration>Customers>Customer Configuration>Address templates
- BStore>Configuration>Customers>Customer Configuration>Account Information Options
- CStore>Configuration>Customers>Customer Configuration>Name and Address Options
- DStore>Configuration>Customers>Customer Configuration>Login Options
30Calling and initializing JavaScript, Magento 2, you have two options for specifying declarative notation: using the data-mage-init attribute & <script type="text/x-magento-init" /> tag Use the data-mage-init attribute to insert a JS component in a specified HTML element. The following example inserts a JS component in the <nav/> element:
What are valid ways to initialize Magento-dependent Javascript on a page? (Select 2)- AIn a HTML element: <div data-mage-init='{ "MyCompany_MyModule/js/modal": {} }' > </div>
- BIn ur modules requirejs-config.js: var config = {deps: [MyConmpany_MyModule/js/modal ]};
- Cusing the data-mage-init attribute
- Dusing the <script type="text/x-magento-init" /> tag
31U'v tasked with creating a new page layout type:text. This similar to a 2-column layout, except that larger of 2columns is slightly smaller so that text is easier to read. U'v created view/page_layout/text.xml but 2 columns r not rendering. Keeping upgradeability in mind, what dud to fix?
- AAdd <update handle="2columns-right">
- BAdd <update handle="2columns">
- CAdd <update handle="3columns">
- DAdd <update handle="1columns">
32ur browsing the uiComponent confiquration in checkout_index_index.xml & see the following code:
<item name="customer-email" xsi:type="array"> <item name="component" xsi:type="string"> Magento_checkout/js/view. </item> <item name="displayArea" xsi:type="string">customer-email </item>
</item>- AIn a knockout template:
<!-- ko foreach: getRegion('before-login-form')-->
<!-- /ko --> - BIn a knockout template:
<!-- ko foreach: getRegion('after-login-form')-->
<!-- /ko --> - CIn a knockout template:
<!-- ko foreach: getRegion('before-register-form')-->
<!-- /ko --> - DIn a knockout template:
<!-- ko foreach: getRegion('login-form')-->
<!-- /ko -->
- AIn a knockout template:
33u see these layout handles r available for customization on the catalog product pages: catalog_product_view catalog_product_vew_type_bundle default 2columns-left ; Which layout handle is always loaded firest on the catalog product page?
- Adefault
- Bblank
- Ccustom
- Dluma
34What effects does enableing a category's "Anchor" setting have?(select 2)
- Ait enables layered navigation
- Bit includes childs products alongside any products associated with the current category
- Cit disables layered navigation
- Dit delete layered navigation
35ur maintaining Magento website that is hosted on an old server(& due to corporate bureaucracy cannot be moved to a better hosting). This server utlizes Apache 2.2 & serves files over a HTTP/1 connection. When the page loads, there is a significant gap untile any Javascript-enabled functionality is usable. What do u do to remediate the slow Javascript?
- AEnable javascript bundling in Store>Configuration>Advanced> Developer>JS
- BEnable css bundling in Store>Configuration>Advanced> Developer>CS
- CEnable full page cache
- DRemove unnecessary js from running requirejs-config.js
- EBuld the static assets with the --bundleJs flag
36n browsing through Magento Luma theme, u see a etc/view.xml file .What is purpose of this file?
- AThis file contains configuration settings for aspects of rendering the theme.
- BThis file contains configuration settings for aspects of rendering the module.
- CThis file contains directive for how to hanlde fallback theme
- DThis file contains layout xml for updating parameter for exiting block
37u have created a new module & all its required files. A ur then making additions to catlog_product_view.xml no change r visible. What is remedy?
- ARun bin/magento module:enable MyCompnay_MyModule
- BRun bin/magento module: set: enable MyCompnay_MyModule
- CRun bin/magento module:active MyCompnay_MyModule
- DRun bin/magento module:live MyCompnay_MyModule
38Keeping maintability i mind , how d u render a link on a CMS pages/block?
- A{{ store url="/path/to/destination"}}
- B{{ store url="/path/to/theme"}}
- C{{ store url="/path/to/module"}}
- D{{ store url="/path/to/plugin"}}
39u need to set cache_key on a block that does not contain a class attribute. How dud this?
- A<referenceBlock name="block.name">
<arguments> <argument name="cache_key" xsi:type="string"> kayName<argument> </arguments>
</referenceBlock> - B<referenceBlock name="block.name">
<arguments> <argument name="cache_key" xsi:type="string"> cache_key<argument> </arguments>
</referenceBlock> - C<referenceBlock name="page.name">
<arguments> <argument name="cache_key" xsi:type="string"> cache_key<argument> </arguments>
</referenceBlock> - D<referenceBlock name="page.name">
<arguments> <argument name="kayName" xsi:type="string"> cache_key<argument> </arguments>
</referenceBlock>
- A<referenceBlock name="block.name">
40Ur creating a new transactional email template. Keeping maintainability in mind , how du add an image located in u theme?
- A<img src="{{ view url="Mycompany _MyModule/images/image.png}}">
- B<img src ="/path/to/file.png"/>
- C<img src="{{ media url="Mycompany _MyModule/image/image.png}}">
- D{{ image theme ="MyCompany_MyModule/images/image.png"}}
Information
- Description
- POOL-1 Full . This quiz was made using my own study notes & the study guide from https://u.magento.com/magento-2-certified-professional-front-end-developer . It is by no means official and is not necessarily similar to the real Magento 2 certification exam. Real Exam need more deep knowledge to working with magento 2 . Hints: 60 items 90m to complete exam,63% pass , 1.5+ hands-on experience Based on Magento (2.2) front end development
- Author
- Miska Red
- Language
- English
- Views
- 2,998
- Tags
- Rating
- 5.0 out of 5 · 1 rating Rate this quiz