Skip to content

Commit 67a7cd3

Browse files
committed
[PR-26010] Update qr_code filter doc
1 parent 7c1c32b commit 67a7cd3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

source/campaigns/editor/filters.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,8 @@ This example can be used in ``Email sending condition`` of Advocate Offer Email
996996
qr\_code
997997
........
998998

999-
Converts a string into a QR code image in SVG format.
999+
Converts a string into a QR code. By default, produces an image in SVG format. If HTML format is specified,
1000+
returns an HTML table, which may be useful for inclusion in emails.
10001001

10011002
.. code-block:: liquid
10021003
@@ -1007,6 +1008,7 @@ Converts a string into a QR code image in SVG format.
10071008
It may take the following arguments:
10081009

10091010
* ``xdim`` - the width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim. Default value is ``4``.
1011+
* ``format`` - custom format for the result. Only ``html`` is supported.
10101012

10111013
This filter generates a QR code that can be used to encode URLs, text, or coupon codes. The QR code is returned as an SVG image that can be directly embedded in HTML.
10121014

@@ -1018,6 +1020,14 @@ This filter generates a QR code that can be used to encode URLs, text, or coupon
10181020
{{ coupon.code | qr_code: xdim: 6 }}
10191021
</div>
10201022
1023+
To return a QR code as an HTML table that can be embedded in email body, use the custom format:
1024+
1025+
.. code-block:: liquid
1026+
1027+
<div class="qr-code-container">
1028+
{{ coupon.code | qr_code: format: 'html' }}
1029+
</div>
1030+
10211031
|hr|
10221032

10231033
rand\_by

0 commit comments

Comments
 (0)