Watermark / Page Items and Functions
These function and page items give you more control over the watermarking process. Please note the following:
An override or debug setting should be set above the watermark page item or function call so that the watermark module can read it.
Set a text override:
<mvt:assign name="g.watermark_text_override" value=" 'This is my new text.' " />
If you are going to use an apostrophe it must be escaped like this:
<mvt:assign name="g.watermark_text_override" value=" 'This isn\'t my new text.' " />
<mvt:item name="watermark" />
If auto-watermarking is turned on, this page item will watermark the image. This is used for sites that want old non-watermarked images to be watermarked. This goes in the HEAD
area ofthe product page above the image machine call -
<mvt:item name="product_display_imagemachine" param="head" />
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_product_images(product_id)" />
This will watermark all image machine images associated with the product id entered. Images that the system has already processed will be skipped. Older stores using legacy images will need to use one of the functions below.
Example: if you're on the product page you can manually watermark your images like this:
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_product_image(l.settings:product:id)" />
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_image_tag(image_path)" />
This will display the image with the watermark. This is non-destructive, the image is not physically watermarked. This is a good way to test but it does not work well for SEO.
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_image_return(image_path)" />
This returns watermarked image data that can be used in an image tag. This is good for testing but not for SEO.
Example:
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc;" name="l.settings:image_data" value="watermark_image_return('/images/my_image.jpg') />
<img src="&mvt:image_data;" alt="my image" />
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_image_display(image_path)" />
This can be used inside an image tag to display the watermarked imaged ata. This is good for testing but not SEO.
<img src="<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc;" name="l.settings:image_data" value="watermark_image_display('/images/my_image.jpg') />" />
<mvt:do file="'/mm5/5.00/modules/util/watermark.mvc'" name="l.ok" value="watermark_write(image_path)" />
This will physically watermark the image.