Really fixed now ;)

This commit is contained in:
Stefan Ritter 2009-10-30 15:18:58 +01:00
parent aea159f141
commit a8f13c725e

View File

@ -332,21 +332,16 @@ else:
print ' <div class="pages_list">' print ' <div class="pages_list">'
print ' <ul class="pages_list">' print ' <ul class="pages_list">'
for staticpage in staticpages_list: for staticpage in staticpages_list:
f = open(staticpage, 'r') file = open(staticpage, 'r')
for line in f: header = file.readline()
if line.split(':', 1)[0] == 'extern_link': if header.split(':', 1)[0] == 'extern_link':
link = '' link = header.split(':', 1)[1].strip()
extern_link = line.split(':', 1)[1].strip()
else: else:
link = re.sub('\w+?\/', '', staticpage) link = re.sub('\w+?\/', '', staticpage)
extern_link = '' link = '?s=' + link
break file.close()
f.close()
title = re.sub('\w+?\/\d+?-', '', staticpage) title = re.sub('\w+?\/\d+?-', '', staticpage)
if extern_link: print ' <li class="pages_list_entry"><a href="' + link + '" class="pages_list_entry">' + title + '</a></li>'
print ' <li class="pages_list_entry"><a href=' + link + '" class="pages_list_entry">' + extern_link + '</a></li>'
else:
print ' <li class="pages_list_entry"><a href="?s=' + link + '" class="pages_list_entry">' + title + '</a></li>'
print ' </ul>' print ' </ul>'
print ' </div>' print ' </div>'
print ' <div class="pages_footer"></div>' print ' <div class="pages_footer"></div>'