comsa/sulu-feature-list-bundle

添加功能列表内容类型

安装: 83

依赖项: 0

建议者: 0

安全: 0

星标: 0

分支: 0

类型:sulu-bundle

2.0.0 2021-08-04 08:57 UTC

This package is auto-updated.

Last update: 2024-09-04 14:29:30 UTC


README

请确保Composer已全局安装,具体请参阅Composer文档中的安装章节

步骤 1:下载Bundle

打开命令行,进入项目目录,执行以下命令以下载此bundle的最新稳定版本

$ composer require comsa/sulu-feature-list-bundle

步骤 2:启用Bundle

然后,通过将其添加到项目config/bundles.php文件中注册的bundle列表中来启用此bundle

// config/bundles.php

return [
    // ...
    Comsa\SuluFeatureListBundle::class => ['all' => true],
];

步骤 3:将JS添加到webpack构建过程

assets/admin/package.json中添加功能列表依赖项,如下所示

{
  // ...
    "dependencies": {
        // ...
        "comsa-sulu-feature-list-bundle": "file:../../vendor/comsa/sulu-feature-list-bundle/Resources/js"
    }
}

使用npm install安装这些资产

步骤 4:将功能列表bundle包添加到管理面板

assets/admin/index.js中,在startAdmin()之前添加以下内容

// ...
// Implement custom extensions here
import 'comsa-sulu-feature-list-bundle';
// ...

用法

现在您可以将它用作普通内容类型

<property name="features" type="feature_list">
    <meta>
        <title lang="en">Feature list</title>
    </meta>
</property>