0

我需要在 Magento 2 的产品页面_prepareLayout前后获得一个块render(例如,用于更改 head 块中的标题)。我尝试了该controller_action_layout_render_before活动,但它在产品页面上不起作用。

4

1 回答 1

0

/lib/internal/Magento/Framework/View/Layout/Generator/Block.php

    // Set layout instance to all generated block (trigger _prepareLayout method)
...
    $this->eventManager->dispatch('core_layout_block_create_after', ['block' => $block]);
...
于 2015-07-27T13:18:05.803 回答