Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace FunkyHelloControllerPath;
- use MagentoFrameworkAppActionAction;
- use MagentoFrameworkAppResponseInterface;
- use MagentoFrameworkViewResultPageFactory;
- use MagentoFrameworkAppActionContext;
- class HelloWorld extends Action
- {
- protected $pagefactory;
- public function __construct(Context $context, PageFactory $pageFactory)
- {
- $this->pagefactory=$pageFactory;
- Parent::__construct($context);
- }
- /**
- * Dispatch request
- *
- * @return MagentoFrameworkControllerResultInterface|ResponseInterface
- * @throws MagentoFrameworkExceptionNotFoundException
- */
- public function execute()
- {
- echo "testing? is working";
- return $this->pagefactory->create();
- }
- }
- <?php
- namespace FunkyHelloBlock;
- use MagentoFrameworkViewElementTemplate;
- class Main extends Template
- {
- public function _prepareLayout()
- {
- }
- }
- <?xml version="1.0" ?>
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
- "urn:magento:framework:Module/etc/routes.xsd">
- <router id="standard">
- <route id="funky" frontName="funky">
- <module name="Funky_Hello"/>
- </route>
- </router>
- </config>
- <?xml version="1.0" ?>
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
- "urn:magento:framework:Module/etc/module.xsd">
- <module name="Funky_Hello" setup_version="0.0.1"/>
- </config>
- <?xml version="1.0"?>
- <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation=
- "urn:magento:framework:View/Layout/etc/page_configuration.xsd">
- <body>
- <referenceContainer name="columns.top">
- <block class="FunkyHelloBlockMain"
- template="workin.phtml"
- name="funky_hello_Hell"/>
- </referenceContainer>
- <referenceContainer name="content">
- <block class="FunkyHelloBlockMain"
- template="Funky_Hello::blockContent.phtml"
- name="funky_hello_HelloWorld"/>
- </referenceContainer>
- </body>
- </page>
- <b>Hello World!</b>
- <h1>It is working or not???</h1>
- <?php echo "nothing is happening why? ";?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement