Skip to content

Conversation

@wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Sep 3, 2025

Overview

Add a "Global-Assets" placeholder.

Related

Changes

  • adds {% static_placeholder "global-assets" %}
  • adds reorder_placeholders.css to move placeholder to bottom of editor's Structure list

Testing

  1. Add to settings_custom.py:
    CMS_PLACEHOLDER_CONF = {
        'global-assets': {
            'plugins': ['SnippetPlugin'],
            'name': 'Global Assets (Styles & Scripts)',
        },
    }
  2. Be logged in and edit page.
  3. Open Structure panel.1
  4. ✅ Verify "Global Assets" placeholder is visible.
  5. ✅ Verify "Global Assets" placeholder is at bottom.
  6. Add plugin to "Global Assets".
  7. ✅ Verify "Snippet" (and PluginImporter) is visible.
  8. ✅ Add snippet. Save page. Refresh. Verify snippet is present on page.

UI

4 & 5 7 8 8
4 snippet loaded 2 add snippet 1 empty 3 snippet added

Notes

Warning

Reordering does not work if editor visits ?structure directly i.e. in a new window e.g. https://texascale.org/featured-stories/?structure.

Footnotes

  1. Such that it opens in a sidebar, not in a new window.

@wesleyboar wesleyboar merged commit f994166 into main Sep 3, 2025
@wesleyboar wesleyboar deleted the feat/global-assets-placeholder branch September 3, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants