nerdexam
Magento

M70-301 · Question #93

You have added some HTML to a custom template located at "template/mytemplates/custom.phtml". Which code snippet is the correct way to create a block for custom.phtml in the layout XML?

The correct answer is A. <block type="core/template" name="custom" template="mytemplates/custom.phtml"/>. See the full explanation below for the reasoning.

Question

You have added some HTML to a custom template located at "template/mytemplates/custom.phtml". Which code snippet is the correct way to create a block for custom.phtml in the layout XML?

Options

  • A<block type="core/template" name="custom" template="mytemplates/custom.phtml"/>
  • B<block type="core/template" name="custom"template="template/mytemplates/ custom.phtml"/>
  • C<block type="custom1' name="custom"template="template/mytemplates/ custom.phtml"/>
  • D<block type="custom" name="custom" template="mytemplates/custom.phtml"/>

How the community answered

(38 responses)
  • A
    74% (28)
  • B
    3% (1)
  • C
    8% (3)
  • D
    16% (6)

Community Discussion

No community discussion yet for this question.

Full M70-301 Practice