This module provides a simple search/replace functionality for DBString derived fields (Text, HTMLText, Varchar) in Silverstripe CMS 4.
- Silverstripe > 4
Install this package using composer
composer require wernerkrauss/ss-stringfield-replace ^0.1
You can define maps to replace in your text field. By default it replaces:
(c)
becomes©
(r)
becomes<sup>®</sup>
(tm)
becomes<sup>™</sup>
|
becomes<br>
This can be used in templates using the Replace
method, e.g.
<h1>$Title.Replace</h1>
You can add your own replacements by modifying SilverStripe\ORM\FieldType\DBString.replacements
config