zazama/silverstripe-elemental-linkify
最新稳定版本:3.0.0
Composer 安装命令:
composer require zazama/silverstripe-elemental-linkify
包简介
A Silverstripe module to create links to elemental elements.
README 文档
README
Introduction
silverstripe-elemental-linkify inserts a link type into TinyMCE where you can choose Elemental elements to link to. It also ships with a DBField that inserts a DropdownField into the CMS allowing you to choose both Page links or Elemental links.
Requirements
- silverstripe/cms ^6
For older versions, see branches 1 (v4) and 2 (v5).
Installation
composer require zazama/silverstripe-elemental-linkify
Usage TinyMCE
Click on the link type "Element" which will open this window.
It will show a Dropdown with formatting: "[Pagename] Elementname"
Usage Shortcode Field
<?php use SilverStripe\ORM\DataObject; use Zazama\ElementalLinkify\Fields\DBElementalLinkifyShortcode; use Zazama\ElementalLinkify\Fields\ElementalLinkifyDropdownField; class Teaser extends DataObject { // ... private static $db = [ 'TeaserLink' => DBElementalLinkifyShortcode::class ]; public function getCMSFields() { $fields = parent::getCMSFields(); // TeaserLink will be auto populated, but you can insert the dropdown yourself with $fields->addFieldToTab('Root.Something', ElementalLinkifyDropdownField::create('TeaserLink', 'TeaserLink')); return $fields; } }
统计信息
- 总下载量: 109
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2021-10-10