dynamic/silverstripe-elemental-blog
Composer 安装命令:
composer require dynamic/silverstripe-elemental-blog
包简介
Show recent posts from a featured blog.
关键字:
README 文档
README
Recent Blog Posts Element for the SilverStripe Elemental module.
Requirements
- PHP ^8.3
- dnadesign/silverstripe-elemental: ^6.0
- sheadawson/silverstripe-dependentdropdownfield: ^4.0
- silverstripe/blog: ^5.0
Installation
composer require dynamic/silverstripe-elemental-blog
Upgrading from version 3.0
SilverStripe Elemental Blog 4.0 is compatible with SilverStripe 6. Key changes:
- Updated to SilverStripe CMS 6
- Requires PHP 8.3 or higher
- Updated
silverstripe/blogto ^5.0 (SS6 compatible) - Updated
dnadesign/silverstripe-elementalto ^6.0 (SS6 compatible) - Removed widget support - The SilverStripe widget module is no longer supported in SS6
ElementBlogWidgetsblock has been removed- Widget-related configuration options have been removed
- If you were using widget functionality, you will need to migrate to alternative solutions
For more information about SilverStripe 6, see the SilverStripe 6 Upgrade Guide.
Usage
There are three blocks available for you to use. It is likely that you will not want all of them to be available to
content authors, so it is recommended that you review what the purpose of each block is, and then add the ones you do not
need to disallowed_elements.
The three blocks are:
ElementBlogPosts
A block to show a list of recent posts by a featured blog. Ideal for home pages or dashboards.
ElementBlogOverview
The purpose of this block is to replicate the output that was originally being given by the Blog module's Layout
template.
Including:
- Title (including Category/Archive/etc titles)
- Content
- Blog Posts
- Pagination
You will likely want to override the very basic default template that has been provided, you can do so by overriding the
template found with the namespace Dynamic\Elements\Blog\Elements\ElementBlogOverview.ss.
Controlling pagination for this block
Pagination config:
pagination_field_default:1(pagination is enabled by default)show_pagination_field:true(content authors have the ability to turn pagination on or off)
With the default configuration, when an author creates a new Overview block, they will be presented with a checkbox
to "Show pagination" (which will be ticked by default). If you do not want your authors to be able to disable
pagination, then you can update the show_pagination_field config to false.
Dynamic\Elements\Blog\Elements\ElementBlogOverview: show_pagination_field: false
If you would like pagination to be turned off by default, then you can update the pagination_field_default to 0.
Dynamic\Elements\Blog\Elements\ElementBlogOverview: pagination_field_default: 0
Using this block on Page types other than Blog
Please consider: While the Overview block does support you using it on other page types, it is primarily designed to
be used on Blog page types. This is because it is Blog and BlogController that provide the relevant info to this
block.
Please consider whether you want this block to be available to other page types, and if you do not, you might want to
add this block to disallowed_elements on your other page types. EG:
App\Model\Page\MyPage: disallowed_elements: - Dynamic\Elements\Blog\Elements\ElementBlogOverview
If you do wish this block to be available on other page types, then please review the contents on the class to see how you can dictate what data should be provided to this block.
ElementBlogPagination
You might decide that you would like Pagination to be displayed quite separately to the Overview block. This can be
achieved by using ElementBlogPagination as a separate block.
Please consider: Like the Overview Block, please consider removing this block from any/all Page types that you do not want it available on. EG, if you do not want to use it at all, you can disallow it for all pages by default:
Page: disallowed_elements: - Dynamic\Elements\Blog\Elements\ElementBlogPagination
Getting more elements
See Elemental modules by Dynamic
Configuration
See SilverStripe Elemental Configuration
Maintainers
Bugtracker
Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.
If the issue does look like a new bug:
- Create a new issue
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.
Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.
Development and contribution
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.
License
See License
dynamic/silverstripe-elemental-blog 适用场景与选型建议
dynamic/silverstripe-elemental-blog 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 57.81k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 03 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「blog」 「block」 「silverstripe」 「element」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dynamic/silverstripe-elemental-blog 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dynamic/silverstripe-elemental-blog 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dynamic/silverstripe-elemental-blog 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Block routes by IP
Laravel package for opinionated blog implementation
See how Matrix and Neo blocks are being used across your sections.
Prevent crawlers from creating a session
Analytics chooser extensions for site settings.
统计信息
- 总下载量: 57.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 25
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-03-05

