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

Parameter in Block Type! 
 
Aneas
Member
 
Avatar
Total Posts:  61
Joined:  2008-07-12
San Vito Chietino, Italy
 

With this string

{{block type="core/template" template="sample/contentmenu.phtml"}}
in can include a SITE. But i want to write some Parameter (Color, Height, Width, URL) in this BlockType…

Like this:

{{block type="core/template" template="sample/contentmenu.phtml?color=#000000&height;=23px&..."}}

is that possible ?? How can i realize that ?

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

simply add the customized attributes as xml-attributes

{{block type="core/template" template="sample/contentmenu.phtml" color="#000000" height="23px"}}

you can get them in the view with

$this->getData('color')

etc.

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