Skip to content

Conversation

@wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Sep 6, 2025

Overview / Changes

Install taccsite_custom/*/ apps before taccsite_cms to allow those custom apps to load templates from themselves before Core-CMS.

Use Cases:

  • {% extend … %}
  • CMS_TEMPLATES

This should fix long-standing non-intuitive template inheritance.

Warning

This may work, but then how to override a Core-CMS template? Currently, fullwidth.html extends ./base.html which extends base.html. In this branch, ./base.html extending base.html causes recursion error.

Tip

To prevent recursion error:

  1. Rename Texascale's base template:
    - from …/texascale_cms/templates/base.html
    - to …/texascale_cms/templates/base_texascale.html
  2. Update Texascale's fullwidth template to:
    - extend ./base_texascale.html

Untested, but makes sense.

Related

Testing

Texascale

  1. Replace {% extends "./fullwidth.html" %} with {% extends "fullwidth.html" %}.
  2. Verify page still loads same styles.
  3. To CMS_TEMPLATES, add ('article.html', 'Article NEW').
  4. Create/Open a page.
  5. Switch page template between "Article" and "Article NEW".
  6. Page styles and markup should not change.

APCD

  1. Replace {% extends "apcd_cms/templates/standard.html" %} with {% extends "standard.html" %}.
  2. Verify extension still occurs.
    Page still loads React app and apcd_cms/css/site.cms.css still loads.

UI

Moving `taccsite_custom/*/` before `taccsite_cms` allows those custom apps to load CMS_TEMPLATES from themself before looking in Core-CMS.

This should fix long-standing unintuitive template inheritance.
@wesleyboar wesleyboar marked this pull request as draft September 6, 2025 01:04
@wesleyboar wesleyboar changed the title fix: allow short template paths in custom CMS apps fix: allow intuitive template paths in custom CMS apps Sep 6, 2025
@wesleyboar
Copy link
Member Author

Tip

To prevent recursion error:

  1. Rename Texascale's base template:
    - from …/texascale_cms/templates/base.html
    - to …/texascale_cms/templates/base_texascale.html
  2. Update Texascale's fullwidth template to:
    - extend ./base_texascale.html

Untested, but makes sense.

@wesleyboar wesleyboar added the enhancement Improvements or additions to existing features label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvements or additions to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants