manuxi/sulu-news-bundle
Composer 安装命令:
composer require manuxi/sulu-news-bundle
包简介
Say hello to Sulu news!
关键字:
README 文档
README
I made this bundle to have the possibility to manage news in my projects without the dependency to elasticsearch. Over time, more and more features have been added.
This bundle contains
- Several filters for News Content Type
- Link Provider
- Sitemap Provider
- Handler for Trash Items
- Handler for Automation
- Possibility to assign a contact as author
- Twig Extension for resolving news / get a list of news
- Events for displaying Activities
- Search indexes
- refresh whenever entity is changed
- distinct between published and draft and more...
The news and their meta information is translatable.
It contains an example twig template.
Please feel comfortable submitting feature requests. This bundle is still in development. Use at own risk 🤞🏻
👩🏻🏭 Installation
Install the package with:
composer require manuxi/sulu-news-bundle
If you're not using Symfony Flex, you'll also
need to add the bundle in your config/bundles.php file:
return [ //... Manuxi\SuluNewsBundle\SuluNewsBundle::class => ['all' => true], ];
Please add the following to your routes_admin.yaml:
SuluNewsBundle: resource: '@SuluNewsBundle/Resources/config/routes_admin.yaml'
Don't forget fo add the index to your sulu_search.yaml:
add "news_published"!
"news_published" is the index of published, "news" the index of unpublished elements. Both indexes are searchable in admin.
sulu_search: website: indexes: - news_published - ...
Last but not least the schema of the database needs to be updated.
Some tables will be created (prefixed with app_):
news, news_translation, news_seo, news_excerpt
(plus some ManyToMany relation tables).
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 news. After page reload you should see the news item in the navigation. Start to create news. Use smart_content property type to show a list of news, e.g.:
<property name="newslist" type="smart_content"> <meta> <title lang="en">News</title> <title lang="de">News</title> </meta> <params> <param name="provider" value="news"/> <param name="max_per_page" value="5"/> <param name="page_parameter" value="page"/> </params> </property>
Example of the corresponding twig template for the news list:
{% for news in newslist %}
<div class="col">
<h2>
{{ news.title }}
</h2>
<h3>
{{ news.subtitle }}
</h3>
<p>
{{ news.created|format_datetime('full', 'none', locale=app.request.getLocale()) }}
</p>
<p>
{{ news.summary|raw }}
</p>
<p>
<a class="btn btn-primary" href="{{ news.routePath }}" role="button">
{{ "Read more..."|trans }} <i class="fa fa-angle-double-right"></i>
</a>
</p>
</div>
{% endfor %}
Since the seo and excerpt tabs are available in the news editor, meta information can be provided like it's done as usual when rendering your pages.
🧶 Configuration
This bundle contains settings for controlling the following tasks:
- Settings for single view - Toggle for header, default hero snippet and breadcrumbs
- Landing pages for breadcrumbs: this can be used to configure the intermediate pages for the breadcrumbs
👩🍳 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 :).
manuxi/sulu-news-bundle 适用场景与选型建议
manuxi/sulu-news-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 650 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 09 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「news」 「sulu」 「sulucms」 「sulu bundle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 manuxi/sulu-news-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 manuxi/sulu-news-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 manuxi/sulu-news-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bundle for creating forms in Sulu.
The bundle provides command to migrate the Sulu database from phpCr to the SuluContentBundle.
Simple News Bundle for Sulu 2 CMS
Extend news to use them also as event
This TYPO3 distribution provides a sample website using bootstrap and the extensions pizpalue and container_elements. The distribution tailors Swiss market featuring German as default language and additional translations to French, English and Finnish.
Package to generate configuration and boilerplate code in Sulu
统计信息
- 总下载量: 650
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-17