0

i need to call top menu or header out ide the magento project in that case how to call it in magento2

in magento1.x we use

<?php

require_once(dirname(__FILE__).'/store/app/Mage.php');

$app = Mage::app();
$session = Mage::getSingleton('core/session', array('name'=>'frontend'));

$block = $app
    ->getLayout()
    ->getBlockSingleton('checkout/cart_sidebar')
    ->setTemplate('checkout/cart/sidebar.phtml');

echo $block->toHtml();

in magento2.0 how to do it?

mapaladiya
  • 607
  • 6
  • 15
Pradeep Kumar
  • 8,731
  • 12
  • 60
  • 86

0 Answers0