arillo/silverstripe-elements-global
最新稳定版本:0.1.1
Composer 安装命令:
composer require arillo/silverstripe-elements-global
包简介
Global Elements
README 文档
README
Elements-global will allow you to define specific elements as being global. Global elements can be added to pages by creating a VirtualElement that will work as a link/placeholder to the global element.
The elements that should be available globaly should implement the IElementsGlobal interface. When creating this elements via a ModelAdmin they will automatically get the flag Global set to true.
You need to specify at least one Element that implements the IElementsGlobal interface.
class HeroElement extends ElementBase implements IElementsGlobal { ... }
You can restrict the allowed elements to be referenced by a virtual element on a per pagetype basis on your config.yml via the virtual_elements attribute.
HomePage: element_relations: Elements: - HeroElement - DownloadElement - TeaserElement - VirtualElement Sidebar: - HeroElement - VirtualElement virtual_elements: Elements: - HeroElement
统计信息
- 总下载量: 1.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-22