element119/module-page-builder-custom-data-attributes-commerce

一个允许向Commerce特定页面构建器内容添加自定义数据的Magento 2模块。

2.0.0 2022-06-06 08:19 UTC

This package is auto-updated.

Last update: 2024-09-06 13:12:20 UTC


README

element119 | 页面构建器自定义数据属性(Commerce)

status github release github release date magento license packagist downloads

🤝 兼容性

对于Magento开源版本,请安装 element119/module-page-builder-custom-data-attributes


此模块是Adobe Commerce兼容版本的 element119/module-page-builder-custom-data-attributes。它增加了对仅Commerce模块添加的额外页面构建器内容类型的支持。目前包括

  • Dotdigitalgroup_Enterprise

  • Magento_BannerPagBuilder


在Magento开源版本上安装此模块会导致由于针对仅Commerce内容类型的修改而引发错误。


📝 功能

✔️ 允许向Commerce特定页面构建器内容添加自定义数据

✔️ 支持自定义页面构建器内容类型

✔️ 允许店铺管理员完全控制自定义属性的 namevalue

✔️ 使用动态行允许管理员根据需要创建、编辑和删除自定义属性


🔌 安装

运行以下命令以 安装 此模块

composer require element119/module-page-builder-custom-data-attributes-commerce
php bin/magento setup:upgrade

⏫ 更新

运行以下命令以 更新 此模块

composer update element119/module-page-builder-custom-data-attributes-commerce

❌ 卸载

运行以下命令以 卸载 此模块

composer remove element119/module-page-builder-custom-data-attributes-commerce
php bin/magento setup:upgrade

🔧 自定义内容类型

要将自定义数据属性添加到自定义页面构建器内容类型,只需复制以下代码并将其粘贴到所有适当的 view/adminhtml/pagebuilder/content_type/{{custom_content_type}}.xml 文件的 <element name="main"> 节点中。

<attribute name="custom_attributes"
           source="data-custom-attributes"
           converter="Element119_PageBuilderCustomDataAttributes/js/converter/attribute/custom-data-attributes"/>

以下是一个扩展的XML树示例。

<type name="your_custom_content_type_name">
    <appearances>
        <appearance name="your_custom_content_type_appearance">
            <elements>
                <element name="main">
                    <attribute name="custom_attributes"
                               source="data-custom-attributes"
                               converter="Element119_PageBuilderCustomDataAttributes/js/converter/attribute/custom-data-attributes"/>
                </element>
            </elements>
        </appearance>
    </appearances>
</type>

📚 用户指南

配置和输出

full


注意

如果没有输出数据,则不会添加HTML data-custom-attributes 属性。

step-4

paypal

对于那些想支持此项目的人。