Magento Front End Developer - Test Questions

Using Layout XML

2. Use Layout XML to Customize a Theme (19%)

Key Areas of Study

  • Ensure you are 100% confident on all the possible ways to add Scripts / CSS through layout XML for different scenarios.
  • Understand <action> tags and how they affect blocks.

Questions

2.1 You want to remove the left structural block from a page. Which code should you use?
A. <remove_block name="left"/>
B. <remove type="left">
C. <remove name="left"/>
D. <remove_structure name="left"/>
2.2 Which three of the following action method(s) are valid ways to add custom JavaScript files?
A. <action method="addItem" ><type>js</type><name>myscript.js</name></action>
B. <action method="addJs"><script>myscript.js</script></action>
C. <action method="addJavascript"><type>js</type><src>myscript.js</src></action>
D. <action method="addJs"><type>skin_js</type><name>myscript.js</name></action>
E. <action method="addItem"><type>skin_js</type> <name>myscript.js</name></action>
F. <action method="appendScript"><type>js</type> <script>myscript.js</script></action>
G. <action method="addScript"><script>myscript.js</script></action>
2.3 You need to add a custom structural block template to a block that will render all children automatically. Which three attributes are NOT required in the block’s XML definition? (Choose THREE.)
A. after 
B. name
C. template
D. before
E. ifModule
F. type
2.4 What is the proper layout update handle for adding a CSS file to the product page?
A. <product>
B. <catalog_product>
C. <catalog_product_view>
D. <default>