In Magento 1
I can edit local.xml
like so:
<default>
<reference name="root">
<block type="core/template" name="above_main" template="page/html/banner.phtml" />
</reference>
</default>
I can edit a template file like so:
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>
<div class="wrapper">
<?php echo $this->getChildHtml('global_notices') ?>
<div class="page">
<?php echo $this->getChildHtml('header') ?>
<?php // MY EDIT: ?>
<?php echo $this->getChildHtml('above_main');
<div class="main-container col2-left-layout">
<div class="main">
<?php echo $this->getChildHtml('breadcrumbs') ?>
<!-- rest of page... -->
This will end up with the file at page/html/banner.phtml
being inserted into the template at my own custom position, above_main
.
OK, so my question is:
How do I do this in Magento 2?