Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Parameters to Blockbuilder
 
Stephan Hoyer
Jr. Member
 
Total Posts:  12
Joined:  2009-02-03
Leipzig
 

Hello

i’m new to magento and currently making some first experiences to it.

I installed the Navadmin-module to generate a custom menue. I want to customize it so it can generate multiple different menues at once. To do so i want to give a parameter wich represents the root of the menu you want to display:

let’s say you’ve got this structure

root
---Menu1
------Item1
------Item2
------Item3
---Menu2
------Item4
------Item5
------Item6

now i want to have the possibilty to call something like this:

<reference name="left">
<block type="navadmin/navadmin" template="navadmin/top.phtml">
<root>Menu2</root>
</block>
</reference>

which generates a list with item 4 to 6.

Now, where is this parameter handed over to the module? Or if this doesn’t work, how can i gain such a funtionality!

thanks for your replies!
Stephan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stephan Hoyer
Jr. Member
 
Total Posts:  12
Joined:  2009-02-03
Leipzig
 

Ok now i got a kind of solution, but it only works with the cms tags

if you use {{block type="navadmin/navadmin" template="navadmin/top.phtml" root="Menu2"}} it works fine, and the paramter is handed over to the phtml-file and can be grabbed with this->getData(’root’)

But this does not work in layout-xmls, can anyone explain me why?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stephan Hoyer
Jr. Member
 
Total Posts:  12
Joined:  2009-02-03
Leipzig
 

Somebody out there wink

i finaly got it!

<reference name="...">
            <
block type="..." name="..." as="..." template="..." after="...">
                <
action method="set[VariableOne]"><[variable_one]>1</[variable_one]></action
            </
block>
</
reference>

This one ist case sensitive, capitals will have to be replaced by underscore, so use e.g.

<action method="setIdOne"><id_one>1</id_one></action>

This also works of cause on CMS pages!

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