cancel
Showing results for 
Search instead for 
Did you mean: 

How create a backend topmenu and content site?

SOLVED

How create a backend topmenu and content site?

How create a backend topmenu and content site?

 

i have to used this:

 

MyModule/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="MyModule_Filemanager::Filemanager"
             title="MyModule"
             module="MyModule_Filemanager"
             parent="Magento_Backend::stores"
             sortOrder="10"
             resource="MyModule_Filemanager::content"/>

        <add id="MyModule_Filemanager::FilemanagerOpen"
             title="Filemanager"
             module="MyModule_Filemanager"
             sortOrder="1"
             action="filemanager/index/index"
             parent="MyModule_Filemanager::Filemanager"
             resource="Magento_Backend::content" />
    </menu>
</config>

 

MyModule/index/index.php

<?php

echo 'aaa';

 

i got the message, after a click of my menu entry in the backend page.. -> "invalid form key"

 

how can i get a successful connetion from my backend menu to my MyModule/index/index.php file?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How create a backend topmenu and content site?

Have you declared a route for filemanager?
Have you created your 'index' controller?

MyModule/index/index.php
This makes no sense.

action attribute in the menu.xml is NOT a direct link to a file.

filemanager/index/index

route/controller folder/action(class execution)

route needs to be declared in routes.xml
controller folder needs to be created in the root of your module "Controllers/index/index.php""
controller class needs boilerplate with contents in _execute function

View solution in original post

3 REPLIES 3

Re: How create a backend topmenu and content site?

I`ve been trying to set up my home decor to Magento but it looks like I have some problem, personally I use WordPress at https://kudoshouse.com ; I develop it on the backend.

Re: How create a backend topmenu and content site?

Have you declared a route for filemanager?
Have you created your 'index' controller?

MyModule/index/index.php
This makes no sense.

action attribute in the menu.xml is NOT a direct link to a file.

filemanager/index/index

route/controller folder/action(class execution)

route needs to be declared in routes.xml
controller folder needs to be created in the root of your module "Controllers/index/index.php""
controller class needs boilerplate with contents in _execute function

Re: How create a backend topmenu and content site?

thank you both for your instructions - it works now :-)