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

Delta Between Two Patch Sets: docs/api/filters.md

Issue 29628724: Issue 5521 - Restructure CMS documentation to make it easier to use and extend (Closed) Base URL: https://hg.adblockplus.org/cms
Left Patch Set: Created Dec. 4, 2017, 9:59 a.m.
Right Patch Set: Add initial API docs Created Dec. 13, 2017, 11:08 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « README.md ('k') | docs/api/functions.md » ('j') | docs/content/includes.md » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # Custom filters #
2
3 The following custom filters can be used on pages:
4
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
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
9 additional context.
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
12 most appropriate page language. The language used can also be specified
13 manually with the locale parameter. Any further keyword arguments passed
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
16 to generate a table of contents.
LEFTRIGHT

Powered by Google App Engine
This is Rietveld