SiteHierarchy.py (cheetah3-3.2.2) | : | SiteHierarchy.py (cheetah3-3.2.3) | ||
---|---|---|---|---|
#!/usr/bin/env python | ||||
"""Create menus and crumbs from a site hierarchy. | """Create menus and crumbs from a site hierarchy. | |||
You define the site hierarchy as lists/tuples. Each location in the hierarchy | You define the site hierarchy as lists/tuples. Each location in the hierarchy | |||
is a (url, description) tuple. Each list has the base URL/text in the 0 | is a (url, description) tuple. Each list has the base URL/text in the 0 | |||
position, and all the children coming after it. Any child can be a list, | position, and all the children coming after it. Any child can be a list, | |||
representing further depth to the hierarchy. See the end of the file for an | representing further depth to the hierarchy. See the end of the file for an | |||
example hierarchy. | example hierarchy. | |||
Use Hierarchy(contents, currentURL), where contents is this hierarchy, and | Use Hierarchy(contents, currentURL), where contents is this hierarchy, and | |||
currentURL is the position you are currently in. | currentURL is the position you are currently in. | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added |