First of all I am explaining settings and scenario of my magento.
- I have add a link ‘go to form’ on product view page and call my custom controller on click.
I add following code in my controller.
public function indexAction() { $this->loadLayout(); $block = $this->getLayout()->createBlock( 'Mage_Core_Block_Template', mycompany.mylink, array( 'template' => mycompany/mylinkform.phtml' ) ) ->setData('varNameOne', 1') ->setData('varNameTwo', 2'); $this->getLayout()->getBlock('content')->append($block); $this->_initLayoutMessages('core/session'); $this->renderLayout(); }
- On frontend, theme is look like custom theme. If I start template path I can see path like: frontend/default/theme name/..
- But on backend theme name is set as ‘Default’.
Now, issue is: ‘go to form’ is open in custom theme which has a path like frontend/default/theme name/template/.... But when I click on this link, my form is open in default theme which has a path like frontend/default/default/template/…
So why this is happening? When I click on link, my form must open in custom theme but I will redirected to default theme and open over there.
I have add .phtml file of form in both the theme.
Please help me on this.
This is a back end theme setting.