Download the PHP package zirak/linkable-dataobjects without Composer
On this page you can find all versions of the php package zirak/linkable-dataobjects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zirak/linkable-dataobjects
More information about zirak/linkable-dataobjects
Files in zirak/linkable-dataobjects
Package linkable-dataobjects
Short Description This module adds the ability to link DataObjects in TinyMCE
License GPL-2
Informations about the package linkable-dataobjects
Linkable DataObjects
Linkable DataObjects is a module that permit to link DataObjects from TinyMCE.
Introduction
Pages are not always the better way to implement things. For example site news can grow rapidly and the first side effect would be a big and difficult to manage SiteTree. DataObjects help maintaining things clean and straight, but unfortunately they are not included in frontend search. This module let you insert DataObject in search.
This module add the ability to link DataObjects through TinyMCE, just like internal pages. The linkable DataObjects must obviously implement a Link() function.
Requirements
- SilverStripe >=3.1 <4.0
Installation
Install the module through composer:
composer require zirak/linkable-dataobjects
composer update
Make the DataObject implement Linkable interface (you need to implement Link(), LinkLabel(), link_shortcode_handler():
Here you are a sample page holder, needed to implement the Link() function into the DataObject:
Register your shortcode handlers in your _config.php
:::php
ShortcodeParser::get('default')->register('yournamespace_yourclass_link', array('YourNamespace\YourClass', 'link_shortcode_handler'));
Flush your cache and start linking your DataObjects.
Suggested modules
- Searchable DataObjects: http://addons.silverstripe.org/add-ons/zirak/searchable-dataobjects