문제

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;?>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top