I would like to be able to set variables using the "Custom Layout Updates" field, which is displayed under Manage Categories -> [Some Category] -> Custom Design , to indicate pieces of data that can be used in the list.phtml category page template.
So far I have been trying to use this:
<reference name="product_list"> <action method="setData"> <name>custom_banner_type</name> <value>single</value> </action> <action method="setData"> <name>custom_banner_position</name> <value>3</value> </action> </reference>
But when I try echo $this->getData("custom_banner_type"); inside list.phtml , data is not available.
I also tried to get the data inside the _beforeToHtml() function inside List.php , the template controller, but that also does nothing!
So, is there a way to pass data / variables using Custom Layout Updates XML data? This should be done there, because the data will change for each individual category, so I cannot use hard-coded files.
source share