anomaly/blocks-module
最新稳定版本:v1.5.0
Composer 安装命令:
composer require anomaly/blocks-module
包简介
Manage sections of content.
关键字:
README 文档
README
anomaly.module.blocks
Manage sections of content.
The Blocks Module provides a powerful way to create and manage reusable content blocks with field-based configuration.
Features
- Field-based block content
- Area-based block organization
- Multiple instance support
- Control panel management
- Template integration
- Block caching
Usage
Defining Block Areas
// In your addon service provider protected $blocks = [ 'sidebar' => [ 'description' => 'Sidebar content blocks' ], 'footer' => [ 'description' => 'Footer content blocks' ] ];
Rendering Blocks
{# Render all blocks in an area #} {% for block in blocks('sidebar') %} {{ block.content|raw }} {% endfor %} {# Get specific block #} {% set block = block('contact_info') %} {% if block %} {{ block.content|raw }} {% endif %}
Creating Blocks
Navigate to Content > Blocks in the control panel to create and manage blocks.
Requirements
- Streams Platform ^1.10
- PyroCMS 3.10+
- Configuration Module ^2.1+
- Settings Module ^2.1+
License
The Blocks Module is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 2.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-09