import platform
import os
from pystache.renderer import Renderer

if platform.system() == "Windows":
	prefix = "transc\\"
else:
	prefix = ""

def render(template_name, variables, template_dir='templates', file_ext=".mustache"):
    """
    Render a mustache template given a dict representing its variables.

    Args:
        template_name (str): the name of the template to be rendered
        variables (dict): a string -> any dict holding values of variables used in the template
        template_dir (str): the template directory, relative to the GitDox root directory.
                            Defaults to 'templates'
        file_ext (str): the file extension of templates. Defaults to '.mustache'

    Returns:
        str: rendered HTML.
    """
    # load shared Mustache templates so we can reference them in our large templates
    partials_dir = prefix + template_dir + os.sep + 'partials' + os.sep
    partials = dict([(filename[:-len(file_ext)], open(partials_dir + filename, 'r').read())
                                    for filename in os.listdir(prefix + template_dir + os.sep + 'partials')
                                    if filename.endswith(file_ext)])
    renderer = Renderer(partials=partials)

    return renderer.render_path(prefix + template_dir + os.sep + template_name + file_ext, variables)

@@ -19,16 +19,83 @@
 port os%0A
+from modules.configobj import ConfigObj%0Afrom paths import get_menu%0A
 from pys
@@ -126,16 +126,45 @@
 nderer%0A%0A
+import cgitb; cgitb.enable()%0A
 if platf
@@ -229,16 +229,178 @@
 fix = %22%22
+%0Arootpath = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + os.sep%0Auserdir = rootpath + %22users%22 + os.sep%0Aconfig = ConfigObj(userdir + 'config.ini')
 %0A%0Adef re
@@ -1479,16 +1479,108 @@
 tials)%0A%0A
+    variables%5B'skin_stylesheet'%5D = config%5B'skin'%5D%0A    variables%5B'navbar_html'%5D = get_menu()%0A
     retu

fix merge error, supply navbar_html and skin_stylesheet again