Answer the question
In order to leave comments, you need to log in
How to set up a Magento template correctly?
You need to implement your own template
and layout
(Magento Full Release - ver 1.9.2.4).
I create in design/frontend
my directory where the theme will be new
and in it a folder defaul
.
The template path looks like this
design/frontend/new/default/template/dev_news/index.phtml
: <h1>Template news/index.phtml</h1>
design/frontend/new/default/layout/dev_news.xml
:<?xml version="1.0" encoding="UTF-8"?>
<layout>
<vitaliydevnews_index_index>
<reference name="content">
<block type="core/template" template="dev_news/index.phtml"/>
</reference>
</vitaliydevnews_index_index>
</layout>
public function indexAction()
{
$this->loadLayout();
$layoutHandles = $this->getLayout()->getUpdate()->getHandles();
echo '<pre>' . print_r($layoutHandles, true) . '</pre>';
$this->renderLayout();
}
Array
(
[0] => default
[1] => STORE_default
[2] => THEME_frontend_rwd_default
[3] => vitaliydevnews_index_index
[4] => customer_logged_out
)
Answer the question
In order to leave comments, you need to log in
Well, for starters, in order for the system to start using a new theme, you need the package and theme (optional, uses default by default) to be installed in the admin panel.
Second. dev_news.xml file is not processed by anything. If you need to customize the theme, then a local.xml file is created in the layout folder and everything is edited there, or the corresponding layout files are copied from the theme base and they are edited.
info2.magento.com/rs/magentosoftware/images/magent...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question