定制 kotaru/sulu-news-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kotaru/sulu-news-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require kotaru/sulu-news-bundle

包简介

Simple News Bundle for Sulu 2 CMS

README 文档

README

PHP 8.3+, Sulu 2.6, Symfony 7.4+

GitHub release Supports Sulu 2.6 or later

Installation

This bundle requires PHP 8.3 or later.

  1. Open a command console, enter your project directory and run:
composer require kotaru/sulu-news-bundle

You'll also need to add the bundle in your config/bundles.php file:

return [
    //...
    Kotaru\Bundle\SuluNewsBundle\SuluNewsBundle::class => ['all' => true],
];
  1. Register the new routes by adding the following to your config/routes/sulu_news_admin.yaml:
sulu_news_api:
    resource: "@SuluNewsBundle/Resources/config/routing_api.yaml"
    prefix: /admin/api
  1. Add following config to your config/image-formats.xml:
<format key="article-header">
  <meta>
      <title lang="cs">Úvodní obrázek článku (2100x900)</title>
      <title lang="en">Article Header (2100x900)</title>
  </meta>

  <scale x="2100" y="900" mode="outbound" />
</format>
  1. Create a template in your templates/news/index.html.twig:

  2. Enjoy the new features of your Sulu installation!

Extras

  • /admin/api/check/news/{uuid} endpoint for checking user permissions to edit this news page.

Twig extensions

Functions

get_related_news

Arguments:

  • uuid: page uuid
  • locale: locale to resolve news for
  • limit: how many news to load

Returns a list of related news with given locale

Usage:

{{ get_related_news('4afdde53-917b-40d2-aed7-3d74c485c39c','en',3) }}
Result: 
[news1,news2,news3]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固