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

Side by Side Diff: 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
Patch Set: Add initial API docs Created Dec. 13, 2017, 11:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
1 # Custom filters #
3 The following custom filters can be used on pages:
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.
« no previous file with comments | « README.md ('k') | docs/api/functions.md » ('j') | docs/content/includes.md » ('J')

Powered by Google App Engine
This is Rietveld