OLD | NEW |
(Empty) | |
| 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. |
OLD | NEW |