Invalid Blocktype

Invalid Blocktype



I try to help a user on magento.stackexchange. So I created his extension and created a new CMS site with the following content:


block type="atwix/cmsattr" template="atwix/cmsattr/list.phtml"



I also allowed the block in the backend at (System -> Permissions -> Blocks).



But if I call the site, then there is no output from the block.



app/code/local/Atwix/Cmsattr/etc/config.xml


<?xml version="1.0"?>
<config>
<modules>
<Atwix_Cmsattr>
<version>0.1.0</version>
</Atwix_Cmsattr>
</modules>
<global>
<blocks>
<atwix_cmsattr>
<class>Atwix_Cmsattr_Block</class>
</atwix_cmsattr>
</blocks>
<models>
<atwix_cmsattr>
<class>Atwix_Cmsattr_Model</class>
</atwix_cmsattr>
</models>
</global>
</config>



app/code/local/Atwix/Cmsattr/Block/List.php


<?php
class Atwix_Cmsattr_Block_List extends Mage_Catalog_Block_Product_Abstract

protected $_itemCollection = null;

public function getItems()

$color = $this->getColor();
if (!$color)
return false;
if (is_null($this->itemCollection))
$this->_itemCollection = Mage::getModel('atwix_cmsattr/products')->getItemsCollection($color);


return $this->_itemCollection;




app/design/frontend/rwd/default/template/atwix/cmsattr/list.phtml



I replaced his template content with "hello world"



What is going on?




2 Answers
2


app/etc/modules


System/Configuration/Advanced


block type="atwix_cmsattr/list" template="atwix/cmsattr/list.phtml"



That should do the trick.



I solved it. I had to use


block type="atwix_cmsattr/list" template="atwix/cmsattr/list.phtml"



Thanks for contributing an answer to Magento Stack Exchange!



But avoid



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



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)