List of all possible block parameters [closed]
-
16-10-2019 - |
문제
Is there a comprehensive list available that shows all available parameters for coding blocks?
For example for a product list. There is the category_id parameter and the column_count parameter, but what other parameters can I use?
해결책
I don't think it's even possible to get a list of all parameters for all blocks since basically you can assign parameter to a block and give it meaning either in the block class or the template file. For example you can do this on the product list block:
$block->setData('doh', true); //let's assume that $block is an instance of the product list block.
//or
$block->setDoh(true);
Even if the parameter doh
is not used in the block class, you can still add this in the template and give it meaning.
<?php if ($this->getData('doh')) : //or $this->getDoh()?>
<span><?php echo $this->__('Homer does not approve')?></span>
<?php else : ?>
<span><?php echo $this->__('Homer approves')?></span>
<?php endif;?>
제휴하지 않습니다 magento.stackexchange