How can I add block through XML layout file, and not programmatically, through controller?












1















How can I add a block through XML layout file, and not programaticaly, through controller?



I have my block and I want to use it in a template that already exists (catalog/category/view.phtml).



How can I do this without going in and changing a controller, and without changing the catalog/category/view.phtml directly?



I want to add this block somewhere in an already existing template through XML, and not programatically.



This is part of my block:



class Mynamespace_Mymodule_Block_Myblock extends Mage_Core_Block_Template
{
public function _construct()
{
$this -> setTemplate("mynamespace_mymodule/myblock.phtml");
return parent::_construct();

}

public function getItemsByCategoryAndUseState($category, $use_state) {
return "some used or new items";
}
}


This is config.xml of my module:



<config>
<modules>
<Mynamespace_Mymodule>
<version>3.0.0.1</version>
</Mynamespace_Mymodule>
</modules>
<global>
<blocks>
<mynamespace_mymodule>
<class>Mynamespace_Mymodule_Block</class>
</mynamespace_mymodule>
</blocks>
</global>
<frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>

</frontend>



This is my package/theme/layout/mynamespace_mymodule.xml:



<layout version="0.1.0">
<catalog_category_view>
<reference name="product_list">
<block type="mynamespace_mymodule/myblock" name="myblock" after="-" />
</reference>
</catalog_category_view>
</layout>


Thanks.










share|improve this question

























  • share your block and XML where you want to reuse

    – Vishwas Bhatnagar
    Nov 25 '16 at 10:30
















1















How can I add a block through XML layout file, and not programaticaly, through controller?



I have my block and I want to use it in a template that already exists (catalog/category/view.phtml).



How can I do this without going in and changing a controller, and without changing the catalog/category/view.phtml directly?



I want to add this block somewhere in an already existing template through XML, and not programatically.



This is part of my block:



class Mynamespace_Mymodule_Block_Myblock extends Mage_Core_Block_Template
{
public function _construct()
{
$this -> setTemplate("mynamespace_mymodule/myblock.phtml");
return parent::_construct();

}

public function getItemsByCategoryAndUseState($category, $use_state) {
return "some used or new items";
}
}


This is config.xml of my module:



<config>
<modules>
<Mynamespace_Mymodule>
<version>3.0.0.1</version>
</Mynamespace_Mymodule>
</modules>
<global>
<blocks>
<mynamespace_mymodule>
<class>Mynamespace_Mymodule_Block</class>
</mynamespace_mymodule>
</blocks>
</global>
<frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>

</frontend>



This is my package/theme/layout/mynamespace_mymodule.xml:



<layout version="0.1.0">
<catalog_category_view>
<reference name="product_list">
<block type="mynamespace_mymodule/myblock" name="myblock" after="-" />
</reference>
</catalog_category_view>
</layout>


Thanks.










share|improve this question

























  • share your block and XML where you want to reuse

    – Vishwas Bhatnagar
    Nov 25 '16 at 10:30














1












1








1








How can I add a block through XML layout file, and not programaticaly, through controller?



I have my block and I want to use it in a template that already exists (catalog/category/view.phtml).



How can I do this without going in and changing a controller, and without changing the catalog/category/view.phtml directly?



I want to add this block somewhere in an already existing template through XML, and not programatically.



This is part of my block:



class Mynamespace_Mymodule_Block_Myblock extends Mage_Core_Block_Template
{
public function _construct()
{
$this -> setTemplate("mynamespace_mymodule/myblock.phtml");
return parent::_construct();

}

public function getItemsByCategoryAndUseState($category, $use_state) {
return "some used or new items";
}
}


This is config.xml of my module:



<config>
<modules>
<Mynamespace_Mymodule>
<version>3.0.0.1</version>
</Mynamespace_Mymodule>
</modules>
<global>
<blocks>
<mynamespace_mymodule>
<class>Mynamespace_Mymodule_Block</class>
</mynamespace_mymodule>
</blocks>
</global>
<frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>

</frontend>



This is my package/theme/layout/mynamespace_mymodule.xml:



<layout version="0.1.0">
<catalog_category_view>
<reference name="product_list">
<block type="mynamespace_mymodule/myblock" name="myblock" after="-" />
</reference>
</catalog_category_view>
</layout>


Thanks.










share|improve this question
















How can I add a block through XML layout file, and not programaticaly, through controller?



I have my block and I want to use it in a template that already exists (catalog/category/view.phtml).



How can I do this without going in and changing a controller, and without changing the catalog/category/view.phtml directly?



I want to add this block somewhere in an already existing template through XML, and not programatically.



This is part of my block:



class Mynamespace_Mymodule_Block_Myblock extends Mage_Core_Block_Template
{
public function _construct()
{
$this -> setTemplate("mynamespace_mymodule/myblock.phtml");
return parent::_construct();

}

public function getItemsByCategoryAndUseState($category, $use_state) {
return "some used or new items";
}
}


This is config.xml of my module:



<config>
<modules>
<Mynamespace_Mymodule>
<version>3.0.0.1</version>
</Mynamespace_Mymodule>
</modules>
<global>
<blocks>
<mynamespace_mymodule>
<class>Mynamespace_Mymodule_Block</class>
</mynamespace_mymodule>
</blocks>
</global>
<frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>

</frontend>



This is my package/theme/layout/mynamespace_mymodule.xml:



<layout version="0.1.0">
<catalog_category_view>
<reference name="product_list">
<block type="mynamespace_mymodule/myblock" name="myblock" after="-" />
</reference>
</catalog_category_view>
</layout>


Thanks.







layout blocks magento-1 xml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 mins ago









Himanshu

802521




802521










asked Nov 25 '16 at 10:23









Vladimir DespotovicVladimir Despotovic

324219




324219













  • share your block and XML where you want to reuse

    – Vishwas Bhatnagar
    Nov 25 '16 at 10:30



















  • share your block and XML where you want to reuse

    – Vishwas Bhatnagar
    Nov 25 '16 at 10:30

















share your block and XML where you want to reuse

– Vishwas Bhatnagar
Nov 25 '16 at 10:30





share your block and XML where you want to reuse

– Vishwas Bhatnagar
Nov 25 '16 at 10:30










2 Answers
2






active

oldest

votes


















1














you can add block with this xml code



<catalog_category_view>
<reference name="content">
<block type="mymodule/myblock" after="-" />
</reference>
</catalog_category_view>


add this is <frontend> tag not in <global>



     <frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>
</frontend>





share|improve this answer


























  • This is the exact answer to the question.

    – Vladimir Despotovic
    Nov 25 '16 at 11:21











  • And what does the after=-= mean?

    – Vladimir Despotovic
    Nov 25 '16 at 11:22











  • Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

    – Vladimir Despotovic
    Nov 25 '16 at 11:26













  • @VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

    – Fme Extensions
    Nov 25 '16 at 11:30













  • See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

    – Vladimir Despotovic
    Nov 25 '16 at 11:32





















0














Solved it partially by using methods of the block in template. I just:




  1. Created the block

  2. Declared the block in module's config.xml

  3. Using it in the template (a .phtml file) like so:

  4. echo $this -> getLayout() 
    -> createBlock('mymodule/myblock')
    -> toHtml();


I want to do it just with .XML layout updates though.






share|improve this answer


























  • which url you trying to set your template?

    – Fme Extensions
    Nov 25 '16 at 11:02











  • This url: 127.0.0.1/mysite/firstcategory.html

    – Vladimir Despotovic
    Nov 25 '16 at 11:03











  • you want to set template for category page?

    – Fme Extensions
    Nov 25 '16 at 11:06











  • I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

    – Vladimir Despotovic
    Nov 25 '16 at 11:07













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%2f147495%2fhow-can-i-add-block-through-xml-layout-file-and-not-programmatically-through-c%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














you can add block with this xml code



<catalog_category_view>
<reference name="content">
<block type="mymodule/myblock" after="-" />
</reference>
</catalog_category_view>


add this is <frontend> tag not in <global>



     <frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>
</frontend>





share|improve this answer


























  • This is the exact answer to the question.

    – Vladimir Despotovic
    Nov 25 '16 at 11:21











  • And what does the after=-= mean?

    – Vladimir Despotovic
    Nov 25 '16 at 11:22











  • Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

    – Vladimir Despotovic
    Nov 25 '16 at 11:26













  • @VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

    – Fme Extensions
    Nov 25 '16 at 11:30













  • See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

    – Vladimir Despotovic
    Nov 25 '16 at 11:32


















1














you can add block with this xml code



<catalog_category_view>
<reference name="content">
<block type="mymodule/myblock" after="-" />
</reference>
</catalog_category_view>


add this is <frontend> tag not in <global>



     <frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>
</frontend>





share|improve this answer


























  • This is the exact answer to the question.

    – Vladimir Despotovic
    Nov 25 '16 at 11:21











  • And what does the after=-= mean?

    – Vladimir Despotovic
    Nov 25 '16 at 11:22











  • Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

    – Vladimir Despotovic
    Nov 25 '16 at 11:26













  • @VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

    – Fme Extensions
    Nov 25 '16 at 11:30













  • See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

    – Vladimir Despotovic
    Nov 25 '16 at 11:32
















1












1








1







you can add block with this xml code



<catalog_category_view>
<reference name="content">
<block type="mymodule/myblock" after="-" />
</reference>
</catalog_category_view>


add this is <frontend> tag not in <global>



     <frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>
</frontend>





share|improve this answer















you can add block with this xml code



<catalog_category_view>
<reference name="content">
<block type="mymodule/myblock" after="-" />
</reference>
</catalog_category_view>


add this is <frontend> tag not in <global>



     <frontend>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace_mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>
</frontend>






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 25 '16 at 12:11

























answered Nov 25 '16 at 11:12









Fme ExtensionsFme Extensions

1,298315




1,298315













  • This is the exact answer to the question.

    – Vladimir Despotovic
    Nov 25 '16 at 11:21











  • And what does the after=-= mean?

    – Vladimir Despotovic
    Nov 25 '16 at 11:22











  • Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

    – Vladimir Despotovic
    Nov 25 '16 at 11:26













  • @VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

    – Fme Extensions
    Nov 25 '16 at 11:30













  • See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

    – Vladimir Despotovic
    Nov 25 '16 at 11:32





















  • This is the exact answer to the question.

    – Vladimir Despotovic
    Nov 25 '16 at 11:21











  • And what does the after=-= mean?

    – Vladimir Despotovic
    Nov 25 '16 at 11:22











  • Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

    – Vladimir Despotovic
    Nov 25 '16 at 11:26













  • @VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

    – Fme Extensions
    Nov 25 '16 at 11:30













  • See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

    – Vladimir Despotovic
    Nov 25 '16 at 11:32



















This is the exact answer to the question.

– Vladimir Despotovic
Nov 25 '16 at 11:21





This is the exact answer to the question.

– Vladimir Despotovic
Nov 25 '16 at 11:21













And what does the after=-= mean?

– Vladimir Despotovic
Nov 25 '16 at 11:22





And what does the after=-= mean?

– Vladimir Despotovic
Nov 25 '16 at 11:22













Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

– Vladimir Despotovic
Nov 25 '16 at 11:26







Something is wrong. I am not getting the output from the block when I added this in config.xml of the module: <frontend> ... <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="useditems" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> ... </config>

– Vladimir Despotovic
Nov 25 '16 at 11:26















@VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

– Fme Extensions
Nov 25 '16 at 11:30







@VladimirDespotovic which file your are editing if it is layout file simple add this code <catalog_category_view> <reference name="content"> <block type="thinkopen_overwriter/filteredbooks" name="usedbooksincategory" after="-" /> </reference> </catalog_category_view> layout file is inapp/design/frontend/spacename/themename/layout/thier are layout file

– Fme Extensions
Nov 25 '16 at 11:30















See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

– Vladimir Despotovic
Nov 25 '16 at 11:32







See my comment above. It didn't work. I added this in my design/frontend/package/theme/layout/mynamespace_mymodule.xml: <layout version="0.1.0"> <frontend> <layout> <updates> <catalog_category_view> <reference name="content"> <block type="mynamespace_mymodule/myblock" name="nameofmyblock" after="-" /> </reference> </catalog_category_view> </updates> </layout> </frontend> </layout>

– Vladimir Despotovic
Nov 25 '16 at 11:32















0














Solved it partially by using methods of the block in template. I just:




  1. Created the block

  2. Declared the block in module's config.xml

  3. Using it in the template (a .phtml file) like so:

  4. echo $this -> getLayout() 
    -> createBlock('mymodule/myblock')
    -> toHtml();


I want to do it just with .XML layout updates though.






share|improve this answer


























  • which url you trying to set your template?

    – Fme Extensions
    Nov 25 '16 at 11:02











  • This url: 127.0.0.1/mysite/firstcategory.html

    – Vladimir Despotovic
    Nov 25 '16 at 11:03











  • you want to set template for category page?

    – Fme Extensions
    Nov 25 '16 at 11:06











  • I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

    – Vladimir Despotovic
    Nov 25 '16 at 11:07


















0














Solved it partially by using methods of the block in template. I just:




  1. Created the block

  2. Declared the block in module's config.xml

  3. Using it in the template (a .phtml file) like so:

  4. echo $this -> getLayout() 
    -> createBlock('mymodule/myblock')
    -> toHtml();


I want to do it just with .XML layout updates though.






share|improve this answer


























  • which url you trying to set your template?

    – Fme Extensions
    Nov 25 '16 at 11:02











  • This url: 127.0.0.1/mysite/firstcategory.html

    – Vladimir Despotovic
    Nov 25 '16 at 11:03











  • you want to set template for category page?

    – Fme Extensions
    Nov 25 '16 at 11:06











  • I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

    – Vladimir Despotovic
    Nov 25 '16 at 11:07
















0












0








0







Solved it partially by using methods of the block in template. I just:




  1. Created the block

  2. Declared the block in module's config.xml

  3. Using it in the template (a .phtml file) like so:

  4. echo $this -> getLayout() 
    -> createBlock('mymodule/myblock')
    -> toHtml();


I want to do it just with .XML layout updates though.






share|improve this answer















Solved it partially by using methods of the block in template. I just:




  1. Created the block

  2. Declared the block in module's config.xml

  3. Using it in the template (a .phtml file) like so:

  4. echo $this -> getLayout() 
    -> createBlock('mymodule/myblock')
    -> toHtml();


I want to do it just with .XML layout updates though.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 25 '16 at 11:03

























answered Nov 25 '16 at 10:33









Vladimir DespotovicVladimir Despotovic

324219




324219













  • which url you trying to set your template?

    – Fme Extensions
    Nov 25 '16 at 11:02











  • This url: 127.0.0.1/mysite/firstcategory.html

    – Vladimir Despotovic
    Nov 25 '16 at 11:03











  • you want to set template for category page?

    – Fme Extensions
    Nov 25 '16 at 11:06











  • I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

    – Vladimir Despotovic
    Nov 25 '16 at 11:07





















  • which url you trying to set your template?

    – Fme Extensions
    Nov 25 '16 at 11:02











  • This url: 127.0.0.1/mysite/firstcategory.html

    – Vladimir Despotovic
    Nov 25 '16 at 11:03











  • you want to set template for category page?

    – Fme Extensions
    Nov 25 '16 at 11:06











  • I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

    – Vladimir Despotovic
    Nov 25 '16 at 11:07



















which url you trying to set your template?

– Fme Extensions
Nov 25 '16 at 11:02





which url you trying to set your template?

– Fme Extensions
Nov 25 '16 at 11:02













This url: 127.0.0.1/mysite/firstcategory.html

– Vladimir Despotovic
Nov 25 '16 at 11:03





This url: 127.0.0.1/mysite/firstcategory.html

– Vladimir Despotovic
Nov 25 '16 at 11:03













you want to set template for category page?

– Fme Extensions
Nov 25 '16 at 11:06





you want to set template for category page?

– Fme Extensions
Nov 25 '16 at 11:06













I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

– Vladimir Despotovic
Nov 25 '16 at 11:07







I don't want to change the template file template/catalog/category/view.phtml. I would like to add block to the template and layout by using XML.

– Vladimir Despotovic
Nov 25 '16 at 11:07




















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%2f147495%2fhow-can-i-add-block-through-xml-layout-file-and-not-programmatically-through-c%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