Merge pull request #5260 from edx/cdodge/remove-edx-footer-for-microsites
For microsites, since we don't have a footer override yet for django tem...
This commit is contained in:
@@ -103,6 +103,16 @@ def open_source_footer_context_processor(request):
|
||||
)
|
||||
|
||||
|
||||
def microsite_footer_context_processor(request):
|
||||
"""
|
||||
Checks the site name to determine whether to use the edX.org footer or the Open Source Footer.
|
||||
"""
|
||||
return dict(
|
||||
[
|
||||
("IS_REQUEST_IN_MICROSITE", microsite.is_request_in_microsite())
|
||||
]
|
||||
)
|
||||
|
||||
def render_to_string(template_name, dictionary, context=None, namespace='main'):
|
||||
|
||||
# see if there is an override template defined in the microsite
|
||||
|
||||
@@ -380,6 +380,9 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
|
||||
# Shoppingcart processor (detects if request.user has a cart)
|
||||
'shoppingcart.context_processor.user_has_cart_context_processor',
|
||||
|
||||
# Allows the open edX footer to be leveraged in Django Templates.
|
||||
'edxmako.shortcuts.microsite_footer_context_processor',
|
||||
)
|
||||
|
||||
# use the ratelimit backend to prevent brute force attacks
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
{% block body %}{% endblock %}
|
||||
{% block bodyextra %}{% endblock %}
|
||||
</div>
|
||||
{% if IS_EDX_DOMAIN %}
|
||||
{% if IS_REQUEST_IN_MICROSITE %}
|
||||
{# For now we don't support overriden Django templates in microsites. Leave footer blank for now which is better than saying Edx.#}
|
||||
{% elif IS_EDX_DOMAIN %}
|
||||
{% if ENABLE_NEW_EDX_FOOTER %}
|
||||
{% include "footer-edx-new.html" %}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user