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

Unified Diff: docs/api/functions.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 side-by-side diff with in-line comments
Download patch
Index: docs/api/functions.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/docs/api/functions.md
@@ -0,0 +1,11 @@
+# Global functions #
+
+The following global functions can be used on pages:
+
+* `get_string(name, page=None)`: retrieves a string from a locale file.
+ Unless a page is specified the locale file matching the name of the current
+ page is used.
+* `get_page_content(page, locale=None)`: returns a dictionary of the content
+ and params for the given page and locale. Locale defaults to the current one
+ if not specified. Provided keys include `head`, `body`, `available_locales`
+ and `translation_ratio`.
« no previous file with comments | « docs/api/filters.md ('k') | docs/api/variables.md » ('j') | docs/content/includes.md » ('J')

Powered by Google App Engine
This is Rietveld