title: Functions
parent: Webber
+lang: en
ctime: 2009-06-24
+mtime: 2010-06-24
change: described get_toc()
-= Calling functions =
+You can call functions only from [[template_mako]], not from
+[[pages|pageformat]]. If you need the latter, look at [[macros]].
-You can call functions only from [[template_mako]]. An example:
+= Example =
Modified ${format_date(mtime)}
+= List of functions =
+
Here's list of functions defined by webber and it's default plugins:
Defined in [[hierarchy.py|hierarchy]], where you find an example.
-== get_sitemap(root, show_orphans) ==
+== get_linear_sitemap(root, show_orphans, level) ==
Returns all pages as "`(level, page, link)`" tuples, where "`page`" is a
"`class File`"-object and link is a relative link from the current page to
You'll need to specify "`root`" if your top-most page isn't named "`Home`".
+The "`level`" will by default start at 1.
+
To put pages into the sitemap that are outside the parent/child relationships,
specify "`True`" for "`show_orphans`".
Defined in [[toc.py|toc]], where you find an example.
-== func ==
-
-A sample function in the [[skeleton.py|skeleton]]. See below.
-
= Writing functions =