From 8fd3ab07ba357fee58f85b7cb72435ba1523c953 Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Mon, 28 Apr 2014 12:03:48 -0500 Subject: [PATCH] If microsites are enabled and it is a microsite request, then take the microsite path for theming --- common/djangoapps/microsite_configuration/microsite.py | 2 +- lms/templates/main.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/microsite_configuration/microsite.py b/common/djangoapps/microsite_configuration/microsite.py index 91f8eaffa1..27f513ebe1 100644 --- a/common/djangoapps/microsite_configuration/microsite.py +++ b/common/djangoapps/microsite_configuration/microsite.py @@ -36,7 +36,7 @@ def is_request_in_microsite(): """ This will return if current request is a request within a microsite """ - return get_configuration() + return bool(get_configuration()) def get_value(val_name, default=None): diff --git a/lms/templates/main.html b/lms/templates/main.html index 8b1603f83a..acbabc2d92 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -20,6 +20,9 @@ <%def name="theme_enabled()"> <% return settings.FEATURES.get("USE_CUSTOM_THEME", False) %> +<%def name="is_microsite()"> + <% return microsite.is_request_in_microsite() %> + <%def name="stanford_theme_enabled()"> <% @@ -61,7 +64,7 @@ <%block name="headextra"/> <% - if theme_enabled(): + if theme_enabled() and not is_microsite(): header_extra_file = 'theme-head-extra.html' header_file = 'theme-header.html' google_analytics_file = 'theme-google-analytics.html'