micschk/namedlinkfield
最新稳定版本:3.0.1
Composer 安装命令:
composer require micschk/namedlinkfield
包简介
A SilverStripe composite field for having various link types *with title*, in a single field with a nicely styled form.
README 文档
README
A single inline link field which allows users to set a title/name for the link, and select
- a page + optional text-anchor from the site tree
- a file from the assets dir
- an e-mail address (mailto link)
- define a custom URL to link to
- or enter a shortcode
Usage
use Restruct\SilverStripe\ORM\FieldType\NamedLinkField; use Restruct\SilverStripe\Forms\NamedLinkFormField; ... private static $db = array( 'NextAction' => NamedLinkField::class, ); ... public function getCMSFields() { $fields = parent::getCMSFields(); $fields->insertBefore( "Content", NamedLinkFormField::create('ActionButton') ); return $fields; }
TODO
- Check source-class-HtmlEditorField_Toolbar.html#_LinkForm for inline uploading of files etc
- Make translatable/i18n
统计信息
- 总下载量: 85
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-12-29