Skip to content

Commit 3ca6694

Browse files
authored
Add example of using escape in image_info captions
1 parent 4a75816 commit 3ca6694

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

tags/image_info.md

+6-20
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,6 @@ Tag will accept the following attributes (**case-sensitive**) as well as the {%
5858
`w`: image width.
5959
: **Default:** `caption`.
6060

61-
### Common presentational attributes
62-
63-
These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.
64-
65-
`break="value"`
66-
: Where value is an HTML element, specified without brackets (e.g. `break="li"`) or some string to separate list items.
67-
: **Default:** unset.
68-
69-
`breakby="integer"` <span class="footnote warning">v4.7.0+</span>
70-
: Used to group list items when separating by `break`. Possible values are lists of integers, like `2` (groups of 2 items) or `1,2` (alternate groups of 1 and 2 items).
71-
: **Default:** `1` (actually unset).
72-
73-
`class="class name"`
74-
: CSS `class` attribute to apply to the `wraptag`, if set.
75-
: **Default:** unset (see [class cross-reference](/tags/tag-attributes-cross-reference#class)).
76-
77-
`wraptag="tag"`
78-
: HTML element to wrap the items grabbed from the `type` attribute, specified without brackets (e.g. `wraptag="ul"`).
79-
: **Default:** unset (but see [wraptag cross-reference](/tags/tag-attributes-cross-reference#wraptag) for exceptions).
80-
8161
## Examples
8262

8363
### Example 1: Gallery thumbnail and caption
@@ -91,6 +71,12 @@ These attributes, which affect presentation, are shared by many tags. Note that
9171

9272
Grabs all images from the 'mammals' category and displays the image thumbnail itself along with the image caption surrounded with HTML `<div>` tags. Note that the image IDs/names are not specified inside the container because they are automatically assigned from the `<txp:images>` tag for each image in the given category.
9373

74+
If you had multi-line captions separated by a blank line, you could pass the caption through the `textile` filter to retain paragraph breaks:
75+
76+
~~~ html
77+
<txp:image_info type="caption" wraptag="div" escape="textile" />
78+
~~~
79+
9480
Other tags used: [images](/tags/images), [thumbnail](/tags/thumbnail).
9581

9682
### Example 2: Multiple pieces of information at once

0 commit comments

Comments
 (0)