manuxi/sulu-testimonials-bundle
Composer 安装命令:
composer require manuxi/sulu-testimonials-bundle
包简介
Say hello to Sulu testimonials!
README 文档
README
English | Deutsch
A Sulu CMS bundle for managing customer testimonials, reviews, and quotes with configurable star ratings.
✨ Features
- Testimonial Management - Create, edit, and publish customer testimonials
- Star Rating System - Configurable 5 or 10 point rating scale with star symbols
- Contact Integration - Link testimonials to Sulu contacts
- Smart Content Provider - Use testimonials in any Sulu page via Smart Content
- Selection Content Types - Single and multiple testimonial selection
- Workflow Support - Draft/Published workflow with versioning
- Multi-language - Full translation support
- SEO & Sitemap - Built-in SEO and sitemap integration
- Search Integration - Admin and website search indexes
- Trash Support - Restore deleted testimonials
- Activity Logging - Track all changes
Breaking change
- uuid - since 1.5.0 (not compatible to previous versions)
📋 Requirements
- PHP 8.2+
- Sulu CMS 3.0+
- Symfony 6.4+ / 7.0+
👩🏻🏭 Installation
Step 1: Install via Composer
composer require manuxi/sulu-testimonials-bundle
Step 2: Register the Bundle
If not using Symfony Flex, add to config/bundles.php:
return [ // ... Manuxi\SuluTestimonialsBundle\SuluTestimonialsBundle::class => ['all' => true], ];
Step 3: Configure Routes
Add to config/routes/sulu_admin.yaml:
SuluTestimonialsBundle: resource: '@SuluTestimonialsBundle/Resources/config/routes_admin.yaml'
Step 4: Update Database
# Preview changes php bin/console doctrine:schema:update --dump-sql # Apply changes php bin/console doctrine:schema:update --force
Step 5: Build Admin Assets
cd assets/admin
npm install
npm run build
Step 6: Grant Permissions
- Go to Settings → User Roles in Sulu Admin
- Select the appropriate role
- Enable permissions for Testimonials
- Save and reload
🧶 Configuration
Create config/packages/sulu_testimonials.yaml:
sulu_testimonials: rating: max_value: 5 # 5 or 10 point scale default_value: 3 # Default rating for new testimonials use_star_symbols: true # Show stars in admin dropdown use_star_widget: false # Use interactive star widget (future)
See Configuration Documentation for all options.
🎣 Usage
Smart Content
Use testimonials in any page template:
<property name="testimonials" type="smart_content"> <meta> <title lang="en">Testimonials</title> <title lang="de">Testimonials</title> </meta> <params> <param name="provider" value="testimonials"/> <param name="max_per_page" value="5"/> <param name="page_parameter" value="page"/> </params> </property>
Selection Types
Single testimonial:
<property name="featured_testimonial" type="single_testimonial_selection"> <meta> <title lang="en">Featured Testimonial</title> </meta> </property>
Multiple testimonials:
<property name="testimonials" type="testimonial_selection"> <meta> <title lang="en">Testimonials</title> </meta> </property>
Twig Template
{% for testimonial in testimonials %}
<div class="testimonial">
<blockquote>{{ testimonial.text|raw }}</blockquote>
{% if testimonial.contact %}
<cite>{{ testimonial.contact.fullName }}</cite>
{% endif %}
{# Rating display - uses global variable #}
{% if testimonial.rating >= 0 %}
{% set maxRating = testimonials_rating_max_value %}
<div class="rating">
{{ testimonial.rating }}/{{ maxRating }}
</div>
{% endif %}
</div>
{% endfor %}
📖 Documentation
🔌 Optional Integrations
Star Rating in Admin Lists
If you have SuluTweaksBundle installed, you can enable star rating display in admin lists. See Admin List Documentation.
👩🍳 Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
📄 License
This bundle is released under the MIT License.
manuxi/sulu-testimonials-bundle 适用场景与选型建议
manuxi/sulu-testimonials-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 02 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sulu」 「testimonials」 「sulucms」 「sulu bundle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 manuxi/sulu-testimonials-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 manuxi/sulu-testimonials-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 manuxi/sulu-testimonials-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bundle for creating forms in Sulu.
Testimonials extension from Swissup
The bundle provides command to migrate the Sulu database from phpCr to the SuluContentBundle.
Add Testimonials to your laravel admin project - https://github.com/bpocallaghan/laravel-admin-starter
Simple News Bundle for Sulu 2 CMS
Package to generate configuration and boilerplate code in Sulu
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-25
