fix: allow intuitive template paths in custom CMS apps #983
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview / Changes
Install
taccsite_custom/*/apps beforetaccsite_cmsto allow those custom apps to load templates from themselves before Core-CMS.Use Cases:
{% extend … %}CMS_TEMPLATESThis should fix long-standing non-intuitive template inheritance.
Warning
This may work, but then how to override a Core-CMS template? Currently,
fullwidth.htmlextends./base.htmlwhich extendsbase.html. In this branch,./base.htmlextendingbase.htmlcauses recursion error.Tip
To prevent recursion error:
basetemplate:- from
…/texascale_cms/templates/base.html- to
…/texascale_cms/templates/base_texascale.htmlfullwidthtemplate to:- extend
./base_texascale.htmlUntested, but makes sense.
Related
Testing
Texascale
{% extends "./fullwidth.html" %}with{% extends "fullwidth.html" %}.CMS_TEMPLATES, add('article.html', 'Article NEW').APCD
{% extends "apcd_cms/templates/standard.html" %}with{% extends "standard.html" %}.Page still loads React app and
apcd_cms/css/site.cms.cssstill loads.UI
…