aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2009-10-30 14:53:37 +0100
committerStefan Ritter <xeno@thehappy.de>2009-10-30 14:53:37 +0100
commitb56bc33a16f4f3f53ed3c9dfd9eb689548fdc9cb (patch)
treec977ea1a7b89687f9865f3bc1fdcd2558ec0bcce /blogthon.cgi
parent9aedd9142a374ba73350a56fba7602bb413415b3 (diff)
Added extern_link tag to static pages
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi9
1 files changed, 8 insertions, 1 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 1f19d4f..92fa98b 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -332,8 +332,15 @@ else:
print ' <div class="pages_list">'
print ' <ul class="pages_list">'
for staticpage in staticpages_list:
+ 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)
+ break
+ f.close()
title = re.sub('\w+?\/\d+?-', '', staticpage)
- link = re.sub('\w+?\/', '', staticpage)
print ' <li class="pages_list_entry"><a href="?s=' + link + '" class="pages_list_entry">' + title + '</a></li>'
print ' </ul>'
print ' </div>'