The exchange template between the interface and the backend (admin or adminhtml) in magento

I want to reuse some Frontend interface element on the backend (in the "design / adminhtml" section). This will consist mainly of template reuse (phtml). However, the reference to the frontend layout descriptor from the backend will seem even better. Does magento provide a location for common user interface components, a way to declare them as shared, or a mechanism for referencing them using the frontend / adminhtml separator? Thanks

+5
source share
1 answer

@coriscus Yes, it is possible. I found a trick with which you use the frontend template from admin.

public function __construct()
{
    parent::__construct();
    $this->setData('area','frontend');
    $this->setTemplate('customer/online.phtml');
}

just set the required area in the block constructor.

+9
source

All Articles