定制 zazama/silverstripe-elemental-linkify 二次开发

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

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

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

Packagist Version GitHub

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"

TinyMCE

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;
    }
}

Dropdown

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-10-10