Documentation

With the "Text Placeholder & Replacements" add-on replace any text content in your pages with a new text, easily manage updates of an entry with multiple appearance on your site or simply use it to replace static text anywhere on your site.

Define a placeholder, use it in any block which generates text output and the placeholder will be replaced with its replacement when the page is rendered.

It supports even Full Page Caching and the Version Online Time Schedule add-on.

After the installation of the add-on you'll find a new section on the dashboard called "Text Placeholder & Replacements". The section contains two new pages: "Placeholder & Replacements" and "Setup".

 

Placeholder & Replacements
Here you can define your placeholder and their replacements. The placeholder are tokenized which means they have a left and right boundary consisting of up to 4 characters. These boundaries are part of the placeholder. This is done to seperate the placeholder from actual content.
If you want to target actual content with a replacement you can remove the boundaries. In order to do that you need to have the proper permissions which are set in the setup page.

The placeholder are case sensitive and special characters in a placeholder might not work in all cases.
All appearances of a placeholder which are not part of a HTML tag are getting replaced. This means the add-on is not touching any HTML-tags but script or style parts included in your page will be effected.

 

Setup
Here you define the default placeholder boundaries and set the edit permissions of user groups. By default all user have all permissions which means they can change the placeholder boundaries, edit the placeholder and replacements, add or remove placeholder and replacement pairs.

You can restrict the permissions of user groups so that they can not change the placeholder boundaries, only edit the replacements of already existing placeholder and replacement pairs or just see the existing pairs and not edit anything at all.

Don't forget to set the permissions of the setup page itself as well, so that a restricted user can not just undo the restriction.


How does the add-on works with a page search?
In a page search by Concrete5's search block or similar search blocks the placeholder will be found, not the replacement. But the output will deliver the replacement again. The placeholder will even be found and replaced if just parts of it fit the search as long as the whole placeholder is displayed.

Therefore one can define as placeholder a text phrase about the meaning of the replacement and a search for the meaning will actually find it even if the outputed text is just showing a number.

One should use alphanumeric placeholder boundaries since they deliver the longest search result output and therefore the biggest chance that the whole placeholder is displayed. Special characters as boundaries are usely getting cut out in a search result output.

External search pages like Google will see and find the replacement.

 

If you would like to manipulate the replacing on a PHP level and even have the possibility to replace HTML code, visit the developer section.

 

More Add-Ons by DreamMedia ...