combat-ui/core-opendxp-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

combat-ui/core-opendxp-bundle

Composer 安装命令:

composer require combat-ui/core-opendxp-bundle

包简介

OpenDXP wrapper bundle for Combat UI: curated, configurable areabricks built on the Combat UI Core Symfony bundle

README 文档

README

OpenDXP wrapper bundle for Combat UI. It ships a curated set of configurable areabricks built on top of the combat-ui/core-bundle Symfony bundle, so editors can compose pages from Combat UI sections and components directly in the OpenDXP document editor.

Requirements

  • PHP 8.4 or 8.5
  • OpenDXP ^1.0
  • combat-ui/core-bundle (installed automatically as a dependency)

Installation

composer require combat-ui/core-opendxp-bundle

The bundle is discovered through its composer type (opendxp-bundle) and registers its dependencies (CombatUICoreBundle, WebpackEncoreBundle) itself. Enable and install it from the OpenDXP bundle manager, or via CLI:

bin/console opendxp:bundle:enable CombatUIOpenDxpBundle
bin/console opendxp:bundle:install CombatUIOpenDxpBundle
bin/console assets:install

assets:install publishes the prebuilt Combat UI Encore build to public/bundles/combatuicore/build; the core bundle wires the combat_ui Encore build there automatically.

Layout integration

Load the Combat UI assets once in your document layout and expose an areablock for the bricks:

<!DOCTYPE html>
<html lang="{{ document.getProperty('language') }}">
    <head>
        {{ cui_assets() }}
    </head>
    <body>
        <main>
            {{ opendxp_areablock('content', {
                allowed: [
                    'cui-hero', 'cui-page-intro', 'cui-cta', 'cui-content', 'cui-card-grid',
                    'cui-accordion', 'cui-tabs', 'cui-carousel', 'cui-media', 'cui-map',
                ]
            }) }}
        </main>
    </body>
</html>

The bricks are full-width bands that bring their own .cui-container wrappers, so place the areablock in a full-bleed region of the layout rather than inside another container.

Bricks

All bricks live in the Combat UI namespace (src/Document/Areabrick) with templates under templates/areas/<brick-id>/view.html.twig. Structural options (variant, tone, spacing, width, …) are configured through the brick dialog (pencil icon); content is edited inline where possible.

Brick ID Dialog options Inline editables
Hero cui-hero variant (split/background/overlay/text), title tag, alignment, width, media position, eyebrow, title, lead, background image WYSIWYG body, media image, primary/secondary links
Page intro cui-page-intro variant (landing/case/vacancy/campaign/full-bleed), tone, alignment, title tag, eyebrow, title, lead, meta lines WYSIWYG body, primary/secondary links
Call to action cui-cta variant (simple/split/full-bleed/sticky), tone, title tag, section spacing, eyebrow, title, lead WYSIWYG body, primary/secondary links
Rich text cui-content section spacing, tone, container width WYSIWYG prose
Card grid cui-card-grid columns, gap, card style (featured/compact/flat/borderless), section spacing, tone, container width per card: image, category, title, excerpt, link
Accordion cui-accordion variant (ghost), open first item per item: summary, WYSIWYG body
Tabs cui-tabs per tab: label, WYSIWYG content
Carousel cui-carousel autoplay, interval, transition, looping, arrows/pagination, width per slide: image, caption
Image cui-media container width image, caption
Map cui-map center, zoom, clustering, fit bounds, scroll-wheel zoom per marker: label, latitude, longitude

Notes

  • Brick auto-registration relies on OpenDXP's default documents.areas.autoload: true; if you disabled it, tag the brick classes with opendxp.area.brick yourself.
  • Image editables render the original asset by default. Override a brick template in your app (templates/bundles/CombatUIOpenDxpBundle/areas/<brick-id>/view.html.twig) to apply thumbnail configurations.
  • Brand-wide component defaults (e.g. default button variant) can be set via the core bundle's combat_ui_core.component_defaults configuration.

Development

Run the Codeception unit suite:

composer install
composer test          # codecept run Unit

The suite covers the bundle contract (nice name, dependent bundles, container extension), every brick's AsAreabrick id, template location and dialog-box editables, and renders each brick view template through the real Combat UI core templates — with the opendxp_* editables stubbed — in both frontend and editmode.

License

GPL-3.0-or-later — see LICENSE.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-07-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固