Search code examples
orocrmorocommerce

How to add condition to only one layout update action in Oro CRM?


I want to apply action in layout update file by specific condition. I know, we can add condition to whole layout update file with conditions property. But can we apply a condition for a certain action, e.g.:

layout:
    actions:
        - '@someAction':
        ...
        - '@move':
            id: id
            parentId: parent_id
            condition: 'context["some_condition"]'

I know, there is no condition property for specific layout update action, but maybe there is some way to achieve same result?


Solution

  • The only option here - is to move the single action with the condition to a separate layout update YAML file. You can place it in the same folder with a different name.