Magento 2.3 Can't view module's front end page output?












1















I'm a bit of a noob when it comes to module development for Magento 2, and I need some help: I've started developing a module (for testing purposes) on a localhost installation of Magento 2.3. Now, I think I've done everything right (I created the module.xml, the registration.php, ecc..) and I'm trying to output a simple message on the frontend. This is my code:





  1. routers.xml



    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
    <route id="test" frontName="test">
    <module name="Ronk_Test" />
    </route>
    </router>





  2. test_index_index.xml



    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <title>Ronk Test Page</title>
    </head>
    <body>
    <referenceContainer name="content">
    <block class="RonkTestBlockTest" name="testPage" template="Ronk_Test::test.phtml" />
    </referenceContainer>
    </body>




  3. test.phtml




echo $block->getTest();


echo __('This is a text.')




  1. Index.php



namespace RonkTestControllerIndex;

use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoFrameworkControllerResultForwardFactory;
use MagentoFrameworkExceptionNotFoundException;
use MagentoFrameworkAppRequestInterface;

/**
* Contact index controller
*/
class Index extends MagentoFrameworkAppActionAction
{
/**
* @var PageFactory
*/
protected $resultPageFactory;

/**
* @var ForwardFactory
*/
protected $resultForwardFactory;

/**
* @var RonkTestHelperData
*/
protected $helper;

/**
* Index constructor.
*
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultForwardFactory $resultForwardFactory
* @param RonkTestHelperData $helper
*/
public function __construct(
Context $context,
PageFactory $resultPageFactory,
ForwardFactory $resultForwardFactory,
RonkTestHelperData $helper
) {
$this->resultPageFactory = $resultPageFactory;
$this->resultForwardFactory = $resultForwardFactory;
$this->helper = $helper;
parent::__construct($context);
}

/**
* Dispatch request
*
* @param RequestInterface $request
* @return MagentoFrameworkAppResponseInterface
* @throws MagentoFrameworkExceptionNotFoundException
*/
public function dispatch(RequestInterface $request)
{
if (!$this->helper->isEnabled()) {
throw new NotFoundException(__('Page not found.'));
}
return parent::dispatch($request);
}

/**
* Ronk Test Page
*
* @return MagentoFrameworkViewResultPage
*/
public function execute()
{
/** @var MagentoFrameworkViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle()->set(__('Ronk Test Page'));
if (!$resultPage) {
$resultForward = $this->resultForwardFactory->create();
return $resultForward->forward('noroute');
}
return $resultPage;
}
}



  1. Data.php



namespace RonkTestHelper;

/**
* Ronk Test helper
*/
class Data extends MagentoFrameworkAppHelperAbstractHelper
{
/**
* Path to store config if extension is enabled
*
* @var string
*/
const XML_PATH_ENABLED = 'ronk/basic/enabled';

/**
* Check if extension enabled
*
* @return string|null
*/
public function isEnabled()
{
return $this->scopeConfig->isSetFlag(
self::XML_PATH_ENABLED,
MagentoStoreModelScopeInterface::SCOPE_STORE
);
}
}


I followed a guide, of course (being new to this) and I can't seem to understand what am I doing wrong.
Whenever i go to 127.0.0.1/magento23/test/index/index it gives me 404.
Any suggestions?










share|improve this question




















  • 1





    Did you enable your module?

    – Keyur Shah
    Dec 20 '18 at 9:53













  • Yes, Everything is enabled

    – Riccardo Ronconi
    Dec 20 '18 at 9:56






  • 1





    could you please remove dispatch(RequestInterface $request) function from RonkTestControllerIndex Index and check? i have suspect that it is returning false

    – Keyur Shah
    Dec 20 '18 at 9:58













  • Tried, it still gives me 404 :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:06
















1















I'm a bit of a noob when it comes to module development for Magento 2, and I need some help: I've started developing a module (for testing purposes) on a localhost installation of Magento 2.3. Now, I think I've done everything right (I created the module.xml, the registration.php, ecc..) and I'm trying to output a simple message on the frontend. This is my code:





  1. routers.xml



    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
    <route id="test" frontName="test">
    <module name="Ronk_Test" />
    </route>
    </router>





  2. test_index_index.xml



    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <title>Ronk Test Page</title>
    </head>
    <body>
    <referenceContainer name="content">
    <block class="RonkTestBlockTest" name="testPage" template="Ronk_Test::test.phtml" />
    </referenceContainer>
    </body>




  3. test.phtml




echo $block->getTest();


echo __('This is a text.')




  1. Index.php



namespace RonkTestControllerIndex;

use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoFrameworkControllerResultForwardFactory;
use MagentoFrameworkExceptionNotFoundException;
use MagentoFrameworkAppRequestInterface;

/**
* Contact index controller
*/
class Index extends MagentoFrameworkAppActionAction
{
/**
* @var PageFactory
*/
protected $resultPageFactory;

/**
* @var ForwardFactory
*/
protected $resultForwardFactory;

/**
* @var RonkTestHelperData
*/
protected $helper;

/**
* Index constructor.
*
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultForwardFactory $resultForwardFactory
* @param RonkTestHelperData $helper
*/
public function __construct(
Context $context,
PageFactory $resultPageFactory,
ForwardFactory $resultForwardFactory,
RonkTestHelperData $helper
) {
$this->resultPageFactory = $resultPageFactory;
$this->resultForwardFactory = $resultForwardFactory;
$this->helper = $helper;
parent::__construct($context);
}

/**
* Dispatch request
*
* @param RequestInterface $request
* @return MagentoFrameworkAppResponseInterface
* @throws MagentoFrameworkExceptionNotFoundException
*/
public function dispatch(RequestInterface $request)
{
if (!$this->helper->isEnabled()) {
throw new NotFoundException(__('Page not found.'));
}
return parent::dispatch($request);
}

/**
* Ronk Test Page
*
* @return MagentoFrameworkViewResultPage
*/
public function execute()
{
/** @var MagentoFrameworkViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle()->set(__('Ronk Test Page'));
if (!$resultPage) {
$resultForward = $this->resultForwardFactory->create();
return $resultForward->forward('noroute');
}
return $resultPage;
}
}



  1. Data.php



namespace RonkTestHelper;

/**
* Ronk Test helper
*/
class Data extends MagentoFrameworkAppHelperAbstractHelper
{
/**
* Path to store config if extension is enabled
*
* @var string
*/
const XML_PATH_ENABLED = 'ronk/basic/enabled';

/**
* Check if extension enabled
*
* @return string|null
*/
public function isEnabled()
{
return $this->scopeConfig->isSetFlag(
self::XML_PATH_ENABLED,
MagentoStoreModelScopeInterface::SCOPE_STORE
);
}
}


I followed a guide, of course (being new to this) and I can't seem to understand what am I doing wrong.
Whenever i go to 127.0.0.1/magento23/test/index/index it gives me 404.
Any suggestions?










share|improve this question




















  • 1





    Did you enable your module?

    – Keyur Shah
    Dec 20 '18 at 9:53













  • Yes, Everything is enabled

    – Riccardo Ronconi
    Dec 20 '18 at 9:56






  • 1





    could you please remove dispatch(RequestInterface $request) function from RonkTestControllerIndex Index and check? i have suspect that it is returning false

    – Keyur Shah
    Dec 20 '18 at 9:58













  • Tried, it still gives me 404 :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:06














1












1








1








I'm a bit of a noob when it comes to module development for Magento 2, and I need some help: I've started developing a module (for testing purposes) on a localhost installation of Magento 2.3. Now, I think I've done everything right (I created the module.xml, the registration.php, ecc..) and I'm trying to output a simple message on the frontend. This is my code:





  1. routers.xml



    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
    <route id="test" frontName="test">
    <module name="Ronk_Test" />
    </route>
    </router>





  2. test_index_index.xml



    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <title>Ronk Test Page</title>
    </head>
    <body>
    <referenceContainer name="content">
    <block class="RonkTestBlockTest" name="testPage" template="Ronk_Test::test.phtml" />
    </referenceContainer>
    </body>




  3. test.phtml




echo $block->getTest();


echo __('This is a text.')




  1. Index.php



namespace RonkTestControllerIndex;

use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoFrameworkControllerResultForwardFactory;
use MagentoFrameworkExceptionNotFoundException;
use MagentoFrameworkAppRequestInterface;

/**
* Contact index controller
*/
class Index extends MagentoFrameworkAppActionAction
{
/**
* @var PageFactory
*/
protected $resultPageFactory;

/**
* @var ForwardFactory
*/
protected $resultForwardFactory;

/**
* @var RonkTestHelperData
*/
protected $helper;

/**
* Index constructor.
*
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultForwardFactory $resultForwardFactory
* @param RonkTestHelperData $helper
*/
public function __construct(
Context $context,
PageFactory $resultPageFactory,
ForwardFactory $resultForwardFactory,
RonkTestHelperData $helper
) {
$this->resultPageFactory = $resultPageFactory;
$this->resultForwardFactory = $resultForwardFactory;
$this->helper = $helper;
parent::__construct($context);
}

/**
* Dispatch request
*
* @param RequestInterface $request
* @return MagentoFrameworkAppResponseInterface
* @throws MagentoFrameworkExceptionNotFoundException
*/
public function dispatch(RequestInterface $request)
{
if (!$this->helper->isEnabled()) {
throw new NotFoundException(__('Page not found.'));
}
return parent::dispatch($request);
}

/**
* Ronk Test Page
*
* @return MagentoFrameworkViewResultPage
*/
public function execute()
{
/** @var MagentoFrameworkViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle()->set(__('Ronk Test Page'));
if (!$resultPage) {
$resultForward = $this->resultForwardFactory->create();
return $resultForward->forward('noroute');
}
return $resultPage;
}
}



  1. Data.php



namespace RonkTestHelper;

/**
* Ronk Test helper
*/
class Data extends MagentoFrameworkAppHelperAbstractHelper
{
/**
* Path to store config if extension is enabled
*
* @var string
*/
const XML_PATH_ENABLED = 'ronk/basic/enabled';

/**
* Check if extension enabled
*
* @return string|null
*/
public function isEnabled()
{
return $this->scopeConfig->isSetFlag(
self::XML_PATH_ENABLED,
MagentoStoreModelScopeInterface::SCOPE_STORE
);
}
}


I followed a guide, of course (being new to this) and I can't seem to understand what am I doing wrong.
Whenever i go to 127.0.0.1/magento23/test/index/index it gives me 404.
Any suggestions?










share|improve this question
















I'm a bit of a noob when it comes to module development for Magento 2, and I need some help: I've started developing a module (for testing purposes) on a localhost installation of Magento 2.3. Now, I think I've done everything right (I created the module.xml, the registration.php, ecc..) and I'm trying to output a simple message on the frontend. This is my code:





  1. routers.xml



    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
    <route id="test" frontName="test">
    <module name="Ronk_Test" />
    </route>
    </router>





  2. test_index_index.xml



    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <title>Ronk Test Page</title>
    </head>
    <body>
    <referenceContainer name="content">
    <block class="RonkTestBlockTest" name="testPage" template="Ronk_Test::test.phtml" />
    </referenceContainer>
    </body>




  3. test.phtml




echo $block->getTest();


echo __('This is a text.')




  1. Index.php



namespace RonkTestControllerIndex;

use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoFrameworkControllerResultForwardFactory;
use MagentoFrameworkExceptionNotFoundException;
use MagentoFrameworkAppRequestInterface;

/**
* Contact index controller
*/
class Index extends MagentoFrameworkAppActionAction
{
/**
* @var PageFactory
*/
protected $resultPageFactory;

/**
* @var ForwardFactory
*/
protected $resultForwardFactory;

/**
* @var RonkTestHelperData
*/
protected $helper;

/**
* Index constructor.
*
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultForwardFactory $resultForwardFactory
* @param RonkTestHelperData $helper
*/
public function __construct(
Context $context,
PageFactory $resultPageFactory,
ForwardFactory $resultForwardFactory,
RonkTestHelperData $helper
) {
$this->resultPageFactory = $resultPageFactory;
$this->resultForwardFactory = $resultForwardFactory;
$this->helper = $helper;
parent::__construct($context);
}

/**
* Dispatch request
*
* @param RequestInterface $request
* @return MagentoFrameworkAppResponseInterface
* @throws MagentoFrameworkExceptionNotFoundException
*/
public function dispatch(RequestInterface $request)
{
if (!$this->helper->isEnabled()) {
throw new NotFoundException(__('Page not found.'));
}
return parent::dispatch($request);
}

/**
* Ronk Test Page
*
* @return MagentoFrameworkViewResultPage
*/
public function execute()
{
/** @var MagentoFrameworkViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle()->set(__('Ronk Test Page'));
if (!$resultPage) {
$resultForward = $this->resultForwardFactory->create();
return $resultForward->forward('noroute');
}
return $resultPage;
}
}



  1. Data.php



namespace RonkTestHelper;

/**
* Ronk Test helper
*/
class Data extends MagentoFrameworkAppHelperAbstractHelper
{
/**
* Path to store config if extension is enabled
*
* @var string
*/
const XML_PATH_ENABLED = 'ronk/basic/enabled';

/**
* Check if extension enabled
*
* @return string|null
*/
public function isEnabled()
{
return $this->scopeConfig->isSetFlag(
self::XML_PATH_ENABLED,
MagentoStoreModelScopeInterface::SCOPE_STORE
);
}
}


I followed a guide, of course (being new to this) and I can't seem to understand what am I doing wrong.
Whenever i go to 127.0.0.1/magento23/test/index/index it gives me 404.
Any suggestions?







magento2 module frontend development magento2.3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 mins ago









Utsav Gupta

15612




15612










asked Dec 20 '18 at 9:46









Riccardo RonconiRiccardo Ronconi

153




153








  • 1





    Did you enable your module?

    – Keyur Shah
    Dec 20 '18 at 9:53













  • Yes, Everything is enabled

    – Riccardo Ronconi
    Dec 20 '18 at 9:56






  • 1





    could you please remove dispatch(RequestInterface $request) function from RonkTestControllerIndex Index and check? i have suspect that it is returning false

    – Keyur Shah
    Dec 20 '18 at 9:58













  • Tried, it still gives me 404 :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:06














  • 1





    Did you enable your module?

    – Keyur Shah
    Dec 20 '18 at 9:53













  • Yes, Everything is enabled

    – Riccardo Ronconi
    Dec 20 '18 at 9:56






  • 1





    could you please remove dispatch(RequestInterface $request) function from RonkTestControllerIndex Index and check? i have suspect that it is returning false

    – Keyur Shah
    Dec 20 '18 at 9:58













  • Tried, it still gives me 404 :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:06








1




1





Did you enable your module?

– Keyur Shah
Dec 20 '18 at 9:53







Did you enable your module?

– Keyur Shah
Dec 20 '18 at 9:53















Yes, Everything is enabled

– Riccardo Ronconi
Dec 20 '18 at 9:56





Yes, Everything is enabled

– Riccardo Ronconi
Dec 20 '18 at 9:56




1




1





could you please remove dispatch(RequestInterface $request) function from RonkTestControllerIndex Index and check? i have suspect that it is returning false

– Keyur Shah
Dec 20 '18 at 9:58







could you please remove dispatch(RequestInterface $request) function from RonkTestControllerIndex Index and check? i have suspect that it is returning false

– Keyur Shah
Dec 20 '18 at 9:58















Tried, it still gives me 404 :(

– Riccardo Ronconi
Dec 20 '18 at 10:06





Tried, it still gives me 404 :(

– Riccardo Ronconi
Dec 20 '18 at 10:06










2 Answers
2






active

oldest

votes


















1














routes.xml file must be present in Ronk/Test/etc/frontend directory. Also make sure the file name is not routers.xml.






share|improve this answer
























  • ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:53











  • Is it working now?

    – Sufyan Khot
    Dec 20 '18 at 10:58











  • Yes, it's working wonders now, thanks a lot!

    – Riccardo Ronconi
    Dec 20 '18 at 10:59











  • happy to know that ;-)

    – Sufyan Khot
    Dec 20 '18 at 11:54



















0














Not entirely sure whether this is the problem but if you create a reference to your block like so:



$blockObj = $block->getLayout()->createBlock('RonkTestControllerIndexIndex'); 


and then you can use $blockObjto access the block methods like $blockObj->getTest()






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f255328%2fmagento-2-3-cant-view-modules-front-end-page-output%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    routes.xml file must be present in Ronk/Test/etc/frontend directory. Also make sure the file name is not routers.xml.






    share|improve this answer
























    • ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

      – Riccardo Ronconi
      Dec 20 '18 at 10:53











    • Is it working now?

      – Sufyan Khot
      Dec 20 '18 at 10:58











    • Yes, it's working wonders now, thanks a lot!

      – Riccardo Ronconi
      Dec 20 '18 at 10:59











    • happy to know that ;-)

      – Sufyan Khot
      Dec 20 '18 at 11:54
















    1














    routes.xml file must be present in Ronk/Test/etc/frontend directory. Also make sure the file name is not routers.xml.






    share|improve this answer
























    • ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

      – Riccardo Ronconi
      Dec 20 '18 at 10:53











    • Is it working now?

      – Sufyan Khot
      Dec 20 '18 at 10:58











    • Yes, it's working wonders now, thanks a lot!

      – Riccardo Ronconi
      Dec 20 '18 at 10:59











    • happy to know that ;-)

      – Sufyan Khot
      Dec 20 '18 at 11:54














    1












    1








    1







    routes.xml file must be present in Ronk/Test/etc/frontend directory. Also make sure the file name is not routers.xml.






    share|improve this answer













    routes.xml file must be present in Ronk/Test/etc/frontend directory. Also make sure the file name is not routers.xml.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 20 '18 at 10:30









    Sufyan KhotSufyan Khot

    899




    899













    • ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

      – Riccardo Ronconi
      Dec 20 '18 at 10:53











    • Is it working now?

      – Sufyan Khot
      Dec 20 '18 at 10:58











    • Yes, it's working wonders now, thanks a lot!

      – Riccardo Ronconi
      Dec 20 '18 at 10:59











    • happy to know that ;-)

      – Sufyan Khot
      Dec 20 '18 at 11:54



















    • ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

      – Riccardo Ronconi
      Dec 20 '18 at 10:53











    • Is it working now?

      – Sufyan Khot
      Dec 20 '18 at 10:58











    • Yes, it's working wonders now, thanks a lot!

      – Riccardo Ronconi
      Dec 20 '18 at 10:59











    • happy to know that ;-)

      – Sufyan Khot
      Dec 20 '18 at 11:54

















    ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:53





    ...I'm an idiot... I called it routers. Sorry and thanks a lot, I would never had seen it :(

    – Riccardo Ronconi
    Dec 20 '18 at 10:53













    Is it working now?

    – Sufyan Khot
    Dec 20 '18 at 10:58





    Is it working now?

    – Sufyan Khot
    Dec 20 '18 at 10:58













    Yes, it's working wonders now, thanks a lot!

    – Riccardo Ronconi
    Dec 20 '18 at 10:59





    Yes, it's working wonders now, thanks a lot!

    – Riccardo Ronconi
    Dec 20 '18 at 10:59













    happy to know that ;-)

    – Sufyan Khot
    Dec 20 '18 at 11:54





    happy to know that ;-)

    – Sufyan Khot
    Dec 20 '18 at 11:54













    0














    Not entirely sure whether this is the problem but if you create a reference to your block like so:



    $blockObj = $block->getLayout()->createBlock('RonkTestControllerIndexIndex'); 


    and then you can use $blockObjto access the block methods like $blockObj->getTest()






    share|improve this answer




























      0














      Not entirely sure whether this is the problem but if you create a reference to your block like so:



      $blockObj = $block->getLayout()->createBlock('RonkTestControllerIndexIndex'); 


      and then you can use $blockObjto access the block methods like $blockObj->getTest()






      share|improve this answer


























        0












        0








        0







        Not entirely sure whether this is the problem but if you create a reference to your block like so:



        $blockObj = $block->getLayout()->createBlock('RonkTestControllerIndexIndex'); 


        and then you can use $blockObjto access the block methods like $blockObj->getTest()






        share|improve this answer













        Not entirely sure whether this is the problem but if you create a reference to your block like so:



        $blockObj = $block->getLayout()->createBlock('RonkTestControllerIndexIndex'); 


        and then you can use $blockObjto access the block methods like $blockObj->getTest()







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 20 '18 at 9:58









        A. FletcherA. Fletcher

        246




        246






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f255328%2fmagento-2-3-cant-view-modules-front-end-page-output%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Polycentropodidae

            Magento 2 Error message: Invalid state change requested

            Paulmy