DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

ReplaceMarkerWithImages

Quite a special application but still useful: Imagine you have a description (TextLong) and a multiple image upload (FileMultiple) column/field. Now what you want is to display the uploaded images at certain positions inside the description as they are useful at that certain point (e.g. because they are screenshots in a step-by-step tutorial). Thus you could use this callback on the description field and tell it to replace certain markers with the files from the image upload column.

For this to achieve the markers could be in any style but they need to follow one of two available patterns:

  • markers following the filename indexing system need to include the original file's names

whereas

  • markers following the numeric indexing system look like ###1### and ###3### and thus represent the first (or third, respectively) uploaded image

sMarker

String. This is not the marker pattern but it defines, how marker generally have to look. In the examples above (and also default) they look like ###blabla###. Anyhow, you could specify here that they look like [[blabla]] or %%blabla%%.

Example and default:

###|###

bUseNumericIndexing

Boolean, default is true. This specifies, as mentioned before, whether to use the numeric indexing system (set it to true; default) or to use the filename indexing system (set it to false). A numeric indexing system starts with 1 (not 0). A filename indexing is based on the name before applying sSingleImageWrap.

sImageField

String, obligatory. You need to tell this interceptor where to get the images from. This is the name of that image-holding field/column.

sImageConcatenate

String. How are multiple images separated in the sImageField? Tell the interceptor here.

Default/Example:

,

sSingleImageWrap

String. Prepare the image paths before outputting them. The interceptor manually converts them into a HTML tag but maybe you need to prepend them with a valid path. Note that you always have to include the pipe symbol here (|) which tells the interceptor where to put the image name.

Example:

fileadmin/images/|