0

I have block:

<block class="Magento\Backend\Block\Widget\Grid\Column" as="name">
    <arguments>
        <argument name="header" xsi:type="string" translate="true">Title</argument>
        <argument name="index" xsi:type="string">title</argument>
        <argument name="header_css_class" xsi:type="string">col-title</argument>
        <argument name="column_css_class" xsi:type="string">col-title</argument>
    </arguments>
</block>

I want to overwrite "header" argument without changing this block. I tried:

<referenceBlock name="name">
        <arguments>
            <argument name="header" xsi:type="string" translate="true">my value</argument>
        </arguments>
</referenceBlock>

but it is not working. When I added name="name" to original block, it worked. So how can I refer to original block without editing it?

1 Answer 1

0

You cannot, you need a name attribute to use a referenceBlock or referenceContainer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.