]> oss.titaniummirror.com Git - webber.git/blobdiff - plugins/hierarchy.py
toc.py, hierarchy.py: add new "Hide: true" page attribute
[webber.git] / plugins / hierarchy.py
index 1b82782957b1c6fa98404d83f9c57cc95d9233d9..2c9c4dc4b5e3b5167e90c17580679adc7f24ecfd 100644 (file)
@@ -31,7 +31,7 @@ def memorize_parent(title, parent, order=100):
                _childs[parent] = []
        _childs[parent].append( (order, title) )
        _parent[title] = parent
-       
+
 
 #
 # The "scan" plugins should scan for meta-data, mostly for links.
@@ -43,6 +43,11 @@ def memorize_parent(title, parent, order=100):
 @set_hook("scan")
 def scan(params):
        file = params["file"]
+
+       # Ignore hidden pages
+       if file.has_key("hide") and file.hide:
+               return
+
        if file.has_key("links"):
                memorize_links(file.linktitle, file.links)
        if file.has_key("parent"):