diff --git a/server/portal/settings/settings.py b/server/portal/settings/settings.py index d576634e3..8982bfa85 100644 --- a/server/portal/settings/settings.py +++ b/server/portal/settings/settings.py @@ -68,6 +68,7 @@ # Custom Portal Template Assets PORTAL_ICON_FILENAME = settings_custom._PORTAL_ICON_FILENAME PORTAL_CSS_FILENAMES = getattr(settings_custom, '_PORTAL_CSS_FILENAMES', []) +PORTAL_JS_FILENAMES = getattr(settings_custom, '_PORTAL_JS_FILENAMES', []) ROOT_URLCONF = 'portal.urls' @@ -683,6 +684,7 @@ def portal_filter(record): SETTINGS_EXPORT = [ 'PORTAL_ICON_FILENAME', 'PORTAL_CSS_FILENAMES', + 'PORTAL_JS_FILENAMES', 'DEBUG', 'GOOGLE_ANALYTICS_PROPERTY_ID', 'PORTAL_NAMESPACE', diff --git a/server/portal/settings/settings_custom.example.py b/server/portal/settings/settings_custom.example.py index a84cdd6cc..017eacf15 100644 --- a/server/portal/settings/settings_custom.example.py +++ b/server/portal/settings/settings_custom.example.py @@ -231,10 +231,23 @@ ######################## # No Art. -# _PORTAL_ICON_FILENAME='' # Empty string yields NO icon. - +# _PORTAL_ICON_FILENAME='' # Empty string yields NO icon. # Default Art. -_PORTAL_ICON_FILENAME = "/static/site_cms/img/favicons/favicon.ico" +# _PORTAL_ICON_FILENAME = "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@813aa7c/ptdatax_assets/favicon.ico" + +# No Extra Scripts. +# _PORTAL_CSS_FILENAMES = [] # Empty array yields NO extra styles. +# Custom CMS Scripts +# _PORTAL_CSS_FILENAMES = [ +# "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@cc02b6d8/lccf_assets/header.css" +# ] + +# No Extra Scripts. +# _PORTAL_JS_FILENAMES = [] # Empty array yields NO extra scripts. +# Custom CMS Scripts +# _PORTAL_JS_FILENAMES = [ +# "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@main/ptdatax_assets/js/open-certain-links-in-new-tab.js" +# ] ######################## # GOOGLE ANALYTICS diff --git a/server/portal/templates/base.html b/server/portal/templates/base.html index 224f3c9c0..fe5238010 100644 --- a/server/portal/templates/base.html +++ b/server/portal/templates/base.html @@ -43,5 +43,12 @@ + + + {% if settings.PORTAL_JS_FILENAMES|length %} + {% for script in settings.PORTAL_JS_FILENAMES %} + + {% endfor %} + {% endif %}