Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: docs/api/filters.md

Issue 29977571: Issue 7201 - Add links to CMS documentation (Closed) Base URL: https://hg.adblockplus.org/cms/
Patch Set: Address comments on PS1 Created Jan. 14, 2019, 3:33 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | docs/api/functions.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Custom filters # 1 # Custom filters #
2 2
3 The following custom filters can be used on pages: 3 The following custom filters can be used on pages:
4 4
5 * `translate(default, name, comment=None)`: translates the given default string 5 * `translate(default, name, comment=None)`: translates the given default string
6 and string name for the current page and locale. The string name should be 6 and string name for the current page and locale. The string name should be
7 unique for the page but otherwise is only seen by the translators. Optionally 7 unique for the page but otherwise is only seen by the translators. Optionally
8 a comment (description) can be specified to help provide the translators with 8 a comment (description) can be specified to help provide the translators with
9 additional context. 9 additional context.
10 * `linkify(url, locale=None, **attrs)`: generates an `<a href="...">` tag for 10 * `linkify(url, locale=None, **attrs)`: generates an `<a href="...">` tag for
11 the URL. If the URL is a page name it will be converted into a link to the 11 the URL. If the URL is a page name it will be converted into a link to the
12 most appropriate page language. The language used can also be specified 12 most appropriate page language. The language used can also be specified
13 manually with the locale parameter. Any further keyword arguments passed 13 manually with the locale parameter. Any further keyword arguments passed
14 are turned into additional HTML attributes for the tag. 14 are turned into additional HTML attributes for the tag.
15 * `toclist(html)`: extracts a list of headings from HTML code, this can be used 15 * `toclist(html)`: extracts a list of headings from HTML code, this can be used
16 to generate a table of contents. 16 to generate a table of contents.
17 17
18 -----
18 Prev: [Variables](variables.md) | Up: [Home](../../README.md) | Next: [Global fu nctions](functions.md) 19 Prev: [Variables](variables.md) | Up: [Home](../../README.md) | Next: [Global fu nctions](functions.md)
OLDNEW
« no previous file with comments | « no previous file | docs/api/functions.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld