]> oss.titaniummirror.com Git - webber.git/blobdiff - in/functions.md
Fix directories key error in get_path_to_root
[webber.git] / in / functions.md
index 38a5d1e658fb767d04233c16bc9f74580b97d880..5b28338241f35bf34e7ac084045a13f16b8b3ae9 100644 (file)
@@ -2,8 +2,8 @@ title: Functions
 parent: Webber
 lang: en
 ctime: 2009-06-24
-mtime: 2010-06-24
-change: described get_toc()
+mtime: 2011-01-13
+change: remove reference to show_orphan
 
 You can call functions only from [[template_mako]], not from
 [[pages|pageformat]]. If you need the latter, look at [[macros]].
@@ -17,17 +17,25 @@ You can call functions only from [[template_mako]], not from
 Here's list of functions defined by webber and it's default plugins:
 
 
-== format_date(timestamp) ==
+== format_date(timestamp, format) ==
 
 Takes a timestamp (seconds since 1st January 1970) and converts it into
-a string, using to `cfg.date_format`.
+a string.
+
+"`format`" is optional. If not used, "`cfg.date_format`" will be used.
+Otherwise it should be a format-string as documented by "`man strftime`". For
+example, "`%Y-%m-%d`" stands for year-month-date.
 
 Defined in `webber.py`.
 
 
-== get_time() ==
+== get_time(format) ==
+
+Returns the current date/time as a string.
 
-Returns the current date/time as a string according to `cfg.date_format`.
+"`format`" is optional. If not used, "`cfg.date_format`" will be used.
+Otherwise it should be a format-string as documented by "`man strftime`". For
+example, "`%Y-%m-%d`" stands for year-month-date.
 
 Defined in `webber.py`.
 
@@ -69,7 +77,7 @@ You'll need to specify "`root`" if your top-most page isn't named "`Home`".
 Defined in [[hierarchy.py|hierarchy]], where you find an example.
 
 
-== get_linear_sitemap(root, show_orphans, level) ==
+== get_linear_sitemap(root, 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
@@ -79,9 +87,6 @@ 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 [[hierarchy.py|hierarchy]], where you find an example.
 
 == get_toc() ==