2

app/code/namespace/module/view/adminhtml/ui-component/product_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="template" xsi:type="string">templates/collapsible2</item>
    </argument>
</form>

Does not render app/code/namespace/module/view/adminhtml/ui-component/templates/collapsible2.xhtml

But if I copy vendor/magento/module-catalog/view/adminhtml/ui_component/product_form.xml and modify the template line and make that app/code/namespace/module/view/adminhtml/ui-component/product_form.xml, and then move or delete vendor/magento/module-catalog/view/adminhtml/ui_component/product_form.xml it works. If I don't move or delete the core file I can't override the template :((((

0

UI Commponent of Extension developers cannot extend this XSD scheme and introduce new components, but can customize existing ones enter here documentation

| improve this answer | |
  • I am not extending the scheme or introducing new components, though alan storm's UI component series shows you how to get around that and add your own components. I'm simply trying to change the template which they say is eligible here (even though they list some of the directory and file locations wrong): devdocs.magento.com/guides/v2.0/ui-components/ui-component.html – user44406 Aug 15 '17 at 22:09
  • 1
    OK, you can probabily run grunt command, for check where is wrong or update your changes, like here, good luck – Adrian R Aug 15 '17 at 22:32
0

You are doing wrong template path

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
    <item name="template" xsi:type="string">templates/collapsible2</item>
</argument>

The path templates/collapsible2 should be

app/code/namespace/module/view/adminhtml/ui-component/templates/collapsible2.xhtml

in app/code/namespace/module/etc/module.xml should add depend on Magento_Ui

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy