0

How can i configure menu.xml file with uiform that i created custom.

Here's the menu code:

/home1/dukaania/public_html/testing2/app/code/Test/Banners/etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Test_Banners::first_level_demo"
             title="Shipping Vendor"
             module="Test_Banners"
             sortOrder="9999"
             resource="Magento_Backend::content" />



              <add id="Test_Banners::second_level_demo"
             title="Shipping Vendor Cost"
             module="Test_Banners"
             sortOrder="0"
             action="uiform/"
             parent="Test_Banners::first_level_demo"
             resource="Magento_Backend::content" />




    </menu>
</config>

Here's the routes file course:

/home1/dukaania/public_html/testing2/app/code/Test/Banners/etc/adminhtml/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="uiform" frontName="uiform">
            <module name="Test_Banners"/>
        </route>
    </router>
</config>

1 Answer 1

0

After Comment I updated My answer

Change action action="uiform/Employee"

and then magento will go to find Index.php file under

app/code/Test/Banners/Controller/Adminhtml/Employee/Index.php

create your Index.php file above directory and your controller code

7
  • 1
    for index.php i just created a folder and file like this: public_html/testing2/app/code/Test/Banners/Controller/Adminhtml/Employee <?php namespace Test\Banners\Controller\Adminhtml\Employee; use Magento\Framework\Controller\ResultFactory; class Edit extends \Magento\Backend\App\Action { /** * @return \Magento\Backend\Model\View\Result\Page */ public function execute() { $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE); return $resultPage; } } Sep 24, 2018 at 13:39
  • @jhonjhondoe check updated answer Sep 24, 2018 at 13:46
  • still nothing show in that page Page link: testing2.dukaania.com/admin_1b9znn/uiform/Employee/index/key/… Sep 24, 2018 at 13:50
  • @jhonjhondoe fire this command in magento root php bin/magento setup:di:compile Sep 24, 2018 at 14:05
  • still not find anything in that page :/ Sep 24, 2018 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.