Attribute include based on custom Design – useful tip on attribute.phtml
This will do a include based on the custom design.
<?php if ($_product->getData('custom_design')): ?>
<?php $_custom_design= $_product->getResource()->getAttribute('custom_design')->getFrontend()->getValue($_product); ?>
<?php if ($_custom_design=="default/your theme name"){
echo $this->getLayout()->createBlock('cms/block')->setBlockId('static block id1')->toHtml()
; }
else {
echo $this->getLayout()->createBlock('cms/block')->setBlockId('static block id2')->toHtml()
; } ?>
<?php endif; ?>
Advertisement
Categories: Uncategorized