diff --git a/taccsite_cms/settings.py b/taccsite_cms/settings.py index 19ba18801..07a86aa47 100644 --- a/taccsite_cms/settings.py +++ b/taccsite_cms/settings.py @@ -305,7 +305,15 @@ def gettext(s): return s PORTAL_STYLES = [] # PORTAL_STYLES = [{ # "is_remote": True, -# "path": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@2cdc59f/example_cms/src/apps/example_app/static/example_app/css/example_app.css", +# "path": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@design/example_assets/css/site.css", +# }, { +# "is_remote": True, +# "page_id": "home", +# "path": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@design/example_assets/css/page.home.css", +# }, { +# "is_remote": True, +# "template_name": "standard.html", +# "path": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@design/example_assets/css/template.standard.css", # }] # Only use integer numbers (not "v1", not "0.11.0"), diff --git a/taccsite_cms/templates/assets_custom.html b/taccsite_cms/templates/assets_custom.html index 8b8be8e18..1add67114 100644 --- a/taccsite_cms/templates/assets_custom.html +++ b/taccsite_cms/templates/assets_custom.html @@ -20,9 +20,33 @@ {% with settings.PORTAL_STYLES as styles %} -{% for style in styles %} - -{% endfor %} + {% for style in styles %} + {% with current_page.reverse_id as page_id %} + {% with CMS_TEMPLATE as page_template %} + {% with style.page_id as style_id %} + {% with style.template_name as style_template %} + {% if style_id == page_id and not style_template or style_template == page_template and not style_id or style_id == page_id and style_template == page_template or not style_id and not style_template %} + + {% endif %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endfor %} {% endwith %}