承接 manuxi/sulu-testimonials-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

manuxi/sulu-testimonials-bundle

最新稳定版本:1.3.5

Composer 安装命令:

composer require manuxi/sulu-testimonials-bundle

包简介

Say hello to Sulu testimonials!

README 文档

README

php workflow symfony workflow License: MIT GitHub Tag Supports Sulu 2.6 or later

I made this bundle to have the possibility to manage testimonials in my projects.

This bundle contains

  • Several filters for Testimonials Content Type
  • Link Provider
  • Sitemap Provider
  • Handler for Trash Items
  • Handler for Automation
  • Possibility to assign a contact as author
  • Twig Extension for resolving Testimonials / get a list of Testimonials
  • Events for displaying Activities
  • Search indexes
    • refresh whenever entity is changed
    • distinct between normal and draft and more...

The testimonials are translatable.

Please feel comfortable submitting feature requests. This bundle is still in development. Use at own risk 🤞🏻

image

👩🏻‍🏭 Installation

Install the package with:

composer require manuxi/sulu-testimonials-bundle

If you're not using Symfony Flex, you'll also need to add the bundle in your config/bundles.php file:

return [
    //...
    Manuxi\SuluTestimonialsBundle\SuluTestimonialsBundle::class => ['all' => true],
];

Please add the following to your routes_admin.yaml:

SuluTestimonialsBundle:
    resource: '@SuluTestimonialsBundle/Resources/config/routes_admin.yaml'

Don't forget fo add the index to your sulu_search.yaml:

add "testimonials"!

"testimonials" is the index of published, "testimonials_draft" the index of unpublished elements.

sulu_search:
    website:
        indexes:
            - testimonials
            - ...

Last but not least the schema of the database needs to be updated.

Some tables will be created (prefixed with app_):
testimonials, testimonials_translation.

See the needed queries with

php bin/console doctrine:schema:update --dump-sql

Update the schema by executing

php bin/console doctrine:schema:update --force

Make sure you only process the bundles schema updates!

🎣 Usage

First: Grant permissions for testimonials. After reload you should see the testimonials item in the navigation. Start to create testimonials. Use smart_content property type to show a list of testimonials, e.g.:

<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>

Example of the corresponding twig template for the testimonials list:

{% for testimonial in testimonials %}
    <div class="col">
        <h2>
            {{ testimonial.contact.fullname }}
        </h2>
        <p>
            {{ testimonial.text|raw }}
        </p>
    </div>
{% endfor %}

👩‍🍳 Contributing

For the sake of simplicity this extension was kept small. Please feel comfortable submitting issues or pull requests. As always I'd be glad to get your feedback to improve the extension :).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-25