Download the PHP package heimrichhannot/contao-replace-bundle without Composer
On this page you can find all versions of the php package heimrichhannot/contao-replace-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heimrichhannot/contao-replace-bundle
More information about heimrichhannot/contao-replace-bundle
Files in heimrichhannot/contao-replace-bundle
Package contao-replace-bundle
Short Description Helper contao bundle to perform a regular expression search and replace on front end page.
License LGPL-3.0-or-later
Informations about the package contao-replace-bundle
Contao Replace Bundle
Helper contao bundle to perform a regular expression search and replace on front end page.
Configuration
Currently it is only possible to search and replace globally. Open your contao settings and configure custom search and replace patterns.
Examples
Wrap headline text in <span>
Before: <h1>Test A</h1>
After: <h1><span>Test A<span></h1>
- Pattern:
(<h\d[^>]*>)(.*)(<\/h[^>]*>)
- Replacement:
$1<span>$2</span>$3
Bootstrap 4 responsive tables
Before: <table><thead><tr><th>Value</th></tr></thead><tbody><tr><td>1</td></tr></tbody></table></body></html>
After: <div class="table-responsive"><table class="table table-bordered table-hover"><thead><tr><th>Value</th></tr></thead><tbody><tr><td>1</td></tr></tbody></table></div>
- Pattern:
(<table>)(.*)(<\/table>)
- Replacement:
<div class="table-responsive"><table class="table table-bordered table-hover">$2</table></div>
Replace files path inside links
Before: <a href="tl_files/subfolder/files/file.pdf">Test link</a>
After: <a href="files/backup/file.pdf">Test link</a>
- Pattern:
(tl_files\/subfolder\/files\/)
- Replacement:
<div class="table-responsive"><table class="table table-bordered table-hover">$2</table></div>
- Replace tags: true (checked)
All versions of contao-replace-bundle with dependencies
contao/core-bundle Version ^4.13 || ^5.0
heimrichhannot/contao-multi-column-editor-bundle Version ^1.2 || ^2.4
symfony/dependency-injection Version ^4.4 || ^5.4 || ^6.0