Skip to content

Magento 2 Layout handle forward / redirection works?

I just want to know is there any concept of Layout handle auto forward / redirection concept available ?
Let me Explain in detail.

  1. Step-1: I have a controller folder called “Test” and action file name “Index”
  2. Step-2: I have another controller folder called “Index” and action file name “Index”
  3. Step-3: Actually I should create 2 layout handles to display the pages
    1. routeid_test_index.xml
    2. routeid_index_index.xml

      But I did create only one layout handle called “routeid_index_index.xml
      And one of my form action I have given action name as “frontname/test/index” but I am seeing the “frontname/index/index” action execution and it is loading “routeid_index_index.xml” file block class and template content.

Is there any possibility to happen like this in magento 2 ?
[I am using magento 2.3.4 version]