\n'%(
- post_ID, domain.domain_css
+ post_ID, domain.domain_css
) + \
' \n'
@@ -229,6 +243,7 @@ def html_main_page(wip_html):
[ '%smetas.html'%domain.srv_wip_template, metas ],
[ '%sheader.html'%domain.srv_wip_template, headers ],
[ '%sfooter.html'%domain.srv_wip_template, footers ],
+ [ '%saside.html'%domain.srv_wip_template, asides ]
]
for file_tpl in files_tpl:
@@ -289,8 +304,17 @@ def html_main_page(wip_html):
# Add latest-posts in page
#-------------------------
- for aside in asides.rsplit('\n'):
- page = '%s\n%s%s'%(page, 8*' ', aside)
+ if os.path.exists(files_tpl[3][0]):
+ asides_datas = open(files_tpl[3][0], 'r').read()
+ for aside_line in asides_datas.rsplit('\n'):
+ page = '%s\n%s%s'%(page, 8*' ', aside_line)
+ else:
+ # No file: use this default
+ for aside in asides.rsplit('\n'):
+ page = '%s\n%s%s'%(page, 8*' ', aside)
+
+ msg_log = 'Use default sidebar in page. Unused file: %s'%files_tpl[3][0]
+ log.append_f(check.post_logs, msg_log, 0)
page = '%s\n%s