lib/helpers.py
changeset 28 b68145b5ce24
parent 26 9d3beac1b196
child 29 b06ff4c05d42
equal deleted inserted replaced
27:2acfbbe14226 28:b68145b5ce24
    11         Returns the current date/time
    11         Returns the current date/time
    12     """
    12     """
    13 
    13 
    14     return time.strftime(config.DATETIME_FMT)
    14     return time.strftime(config.DATETIME_FMT)
    15 
    15 
       
    16 def breadcrumb (trail, links=True) :
       
    17     """
       
    18         Returns a nicely formatted breadcrumb tail, optinally with links
       
    19     """
       
    20 
       
    21     return ' » '.join(
       
    22         (
       
    23             '<a href="$site_url/%s">%s</a>' % (page.url, page.title) if links else page.title
       
    24         ) for page in trail
       
    25     )
       
    26