Magento Forum

   
Block type? 
 
andrewmaier
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2008-01-13
 

type – This is the identifier of the module class that defines the functionality of the block. This attribute must not be modified.

I’m confused why we cannot modify this attribute, and, if we can’t, what types we have to choose from.

-Andrew

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewmaier
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2008-01-13
 

Okay. That makes sense now. I’m playing around trying to figure out engine.

Right now I’m trying to turn:

http://vertigocore.com/kps_wide/sample.html
http://vertigocore.com/kps_wide/cart.html

and

http://vertigocore.com/kps_wide/item.html

into a semblance of a store.

My next question has to do with getting “header” to be called “menuBar” as I’ve made it in my xhtml/css layouts. I can’t figure out how to do this. So I’m declaring

<block type="page/html_header" name="MENUBAR" as="MENUBAR">
<block type="page/html_toplinks" name="top.left.links" as="topLeftLinks"/>
<block type="page/html_toplinks" name="top.right.links" as="topRightLinks"/>

<block type="core/text_list" name="top.menu" as="topMenu"/>
</block>

But that’s not working the way I want. I don’t know how to get it to be similar to my page. I want just

<h1> logo< </h1>
<searchbar></searchbar>
<links></links>

So I figured I’d give up on calling it anything but header, as that wasn’t working out. But then I can’t decipher where/how to edit or find

<?=$this->getChildHtml('topSearch')?>

Maybe it’s just too late for me to figure this out tonight. I don’t know.

-A

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jonathan Hedrén
Member
 
Total Posts:  67
Joined:  2007-08-31
Sweden
 

How is this supposed to work when using own modules with a non-"Mage" namespace?

I’ve got to work by putting the whole classname into the ‘type’ attribute in the layout-xml’s. Not sure if that’s the way to go though - I guess it should be done like this (?):

Let’s say I have my own logic in MyNameSpace/MyModule/Block/Mylogic.php.

I guess I first declare a “mymodule” block-group in my module’s config.xml…

<config>
...
    <global>
    ...
        <
blocks>
            <
mymodule><class>MyNameSpace_MyModule_Block</class></mymodule>
        </
blocks>
    </global>
</
config>
...and the call it in the layout-xml with
<block type="mymodule/mylogic" ... />

Right? smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewmaier
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2008-01-13
 

Okay, that’s defiantely clearing things up. I just need to know where to go for things like:

<?=$this->getChildHtml('topSearch')?>
<?=$this->getChildHtml('topRightLinks')?>

Also not too happy about not being able to rename the header. I’l get over it, I guess smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
valajbeg
Jr. Member
 
Total Posts:  23
Joined:  2009-11-04
 

may be this is an old thread but i have question related to it

1. how to printout all block types

2. if i have <block type="checkout/cart_sidebar" and i want to change it to <block type="checkout/cart_top" since i want to pass there some specific data how can i do it.. just simple tips please

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top