diff options
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-x | blogthon.cgi | 9 |
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>' |