Added extern_link tag to static pages
This commit is contained in:
parent
9aedd9142a
commit
b56bc33a16
@ -332,8 +332,15 @@ 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:
|
||||||
title = re.sub('\w+?\/\d+?-', '', staticpage)
|
f = open(staticpages_dir + staticpage, 'r')
|
||||||
|
for line in f:
|
||||||
|
if line.split(':', 1)[0] == 'extern_link':
|
||||||
|
link = line.split(':', 1)[1].strip()
|
||||||
|
else:
|
||||||
link = re.sub('\w+?\/', '', staticpage)
|
link = re.sub('\w+?\/', '', staticpage)
|
||||||
|
break
|
||||||
|
f.close()
|
||||||
|
title = re.sub('\w+?\/\d+?-', '', staticpage)
|
||||||
print ' <li class="pages_list_entry"><a href="?s=' + link + '" class="pages_list_entry">' + title + '</a></li>'
|
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>'
|
||||||
|
Loading…
Reference in New Issue
Block a user