So, I followed this guide (
https://devs.x-cart.com/design_changes/adding_tabs.html) in order to learn how to add a tab to an Admin Page. It worked in adding the custom tab to the Products page, however; when I tried to implement the same procedure to add a tab to the
Front Page settings page, it simply added the body of my tab's template between the page title and the row of tabs.
Code:
<?php
// vim: set ts=4 sw=4 sts=4 et:
namespace XLite\Module\LBS\MultiLingualBanner\Controller\Admin;
/**
* Front Page
*/
abstract class FrontPage extends \XLite\Controller\Admin\FrontPage implements \XLite\Base\IDecorator
{
public function getPages()
{
$list = parent::getPages();
$list['custom_tab'] = 'My Custom Tab';
return $list;
}
protected function getPageTemplates()
{
$list = parent::getPageTemplates();
$list['custom_tab'] = 'modules/LBS/MultiLingualBanner/tab/custom_tab.twig';
return $list;
}
}
Are the tabs on this page handled differently than those on the Products page? How can I properly place my template as a tab on the
Front Page settings page?