View Single Post
Old 05-15-2021, 11:51 AM
  The Knotty Celt's Avatar 
The Knotty Celt The Knotty Celt is offline

Join Date: Jan 2020
Posts: 27

Default Adding Tabs to Admin Pages

So, I followed this guide ( 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.

<?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?
X-Cart version
PHP version 7.3.29
Reply With Quote