You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/add-ons/pro-variables/type.md
+24-21Lines changed: 24 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,11 +42,11 @@ Character to separate multiple values. Either a new line (`\n`), a pipe (`|`) or
42
42
43
43
Displays a date picker. To output anything other than a timestamp, use the `{exp:pro_variables:single}` tag. This takes the same parameters as the native Date field. Additionally, use `modifier="relative"` to output a relative date string.
@@ -58,6 +58,16 @@ Uses the native [File field](/fieldtypes/file.md). To output the variable, alway
58
58
59
59
Allows applying modifiers, which, among other, are used to apply [on-the-fly image manipulations](/fieldtypes/file.md#on-the-fly-image-manipulations) to files
60
60
61
+
### Code example
62
+
63
+
{exp:pro_variables:pair var="my_file_var"}
64
+
<figure>
65
+
<img src="{my_file_var:image}">
66
+
<figcaption>Photo by {my_file_var:credit}</figcaption>
67
+
</figure>
68
+
{my_file_var:description}
69
+
{/exp:pro_variables:pair}
70
+
61
71
## Grid
62
72
63
73
Uses the native [Grid field](/fieldtypes/grid.md). All native types are available, _except for Relationships and Members_. To output the variable, use the `{exp:pro_variables:pair}` or `{exp:pro_variables:single}` tag where appropriate. You can use any of Grid’s [parameters](/fieldtypes/grid.md#parameters) and [variables](/fieldtypes/grid.md#variables) using these tags. Additionally, one more parameter is available:
@@ -68,17 +78,9 @@ Uses the native [Grid field](/fieldtypes/grid.md). All native types are availabl
68
78
69
79
Any of the available [modifiers](/fieldtypes/grid.md#modifiers), which will trigger the output the modifier provides.
@@ -355,14 +357,15 @@ To be used in combination with `format`. Possible values: `none`, `safe` or `all
355
357
356
358
#### `preparse:_my_var_`
357
359
358
-
If the variable content contains variables that need to be parsed before it is put in the template, you can use this parameter, similar to [embed variables](/templates/embedding.md#embedding-variables). For example: setting the parameter `preparse:foo="bar"` will replace the variable`{preparse:foo}` with `bar` in the variable content.
360
+
If the variable content itself contains variables that ought to be parsed before the Pro Variable is put in the template, you can use this parameter. It's similar to [embed variables](/templates/embedding.md#embedding-variables). For example: setting the parameter `preparse:foo="bar"` will replace `{preparse:foo}` with `bar` in the variable content.
359
361
360
362
#### `preparse_prefix`
361
363
362
-
See above, change the default variable prefix from `preparse` to something else. For example, the parameters `preparse:foo="bar" preparse_prefix="lv"` will replace the variable `{lv:foo}` with `bar` inside the variable content.
364
+
Used with pre-parsing, this changes the default variable prefix from `preparse` to something else. For example, the parameters `preparse_prefix="pv" preparse:foo="bar"` will replace `{pv:foo}` with `bar` inside the variable content.
0 commit comments