Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates: Add possibility to overwrite HTML templates from Base Modules in Template modules. #3398

Closed
AntonLV opened this issue Jun 2, 2021 · 3 comments
Assignees
Milestone

Comments

@AntonLV
Copy link
Contributor

AntonLV commented Jun 2, 2021

Try to realize the same possibility for CSS classes.

@AntonLV AntonLV added this to the 13.0.0 milestone Jun 2, 2021
@AntonLV AntonLV self-assigned this Jun 2, 2021
AntonLV added a commit that referenced this issue Jun 2, 2021
@AntonLV
Copy link
Contributor Author

AntonLV commented Jun 2, 2021

HTML files in modules with <bx_include_base: /> should be removed to allow Template engine to search in Custom template -> Base Modules -> Base System.
For example, modules/boonex/persons/template/cover.html file with the following content:

<bx_include_base:../modules/base/profile/template/cover.html />

@AntonLV
Copy link
Contributor Author

AntonLV commented Sep 17, 2021

  1. Empty CSS files in modules can be removed, like modules/boonex/persons/templates/css/main.css, which just includes the parent CSS file from Base Profile module using @import instruction.
  2. @import instructions isn't needed in module's CSS files anymore. For example, modules/boonex/persons/templates/css/main.css CSS file may not use the code @import url(../../../../base/profile/template/css/main.css); to include CSS file from parent Base module because parent CSS file will be added automatically when BxDolModuleTemplate::addCss('main.css') code is used.

Note: If 1 and 2 won't be done, CSS files referenced from Base modules, like base/general/template/css/main.css, will be included a number of times and prevent the correct work of 'overwrite in template' feature.

Check process for Text based module: Template:[[module's folder]/css] -> Template:[mod_text/css] -> Template:[mod_general/css] -> Template:[system/css folder] -> Core:[[module's folder]/template/css] -> Core:[base/text/template/css] -> Core:[base/general/template/css] -> Core:[template/css].

AntonLV added a commit that referenced this issue Sep 17, 2021
AntonLV added a commit that referenced this issue Sep 17, 2021
AntonLV added a commit that referenced this issue Oct 20, 2021
AntonLV added a commit that referenced this issue Nov 8, 2021
…erwritten with system forms.css defined in template.
AntonLV added a commit that referenced this issue Nov 8, 2021
@AlexTr AlexTr modified the milestones: 13.0.0-A1, 13.0.0-A2, 13.0.0-A3 Nov 17, 2021
@AntonLV AntonLV closed this as completed Dec 27, 2021
AntonLV added a commit that referenced this issue Feb 23, 2022
AntonLV added a commit that referenced this issue Mar 11, 2022
@AntonLV
Copy link
Contributor Author

AntonLV commented Mar 11, 2022

Check process was changed. First of all system checks in module related locations (in template, in core), then it checkes in system locations (in template, in core). This approach is more close to initial one.
Check process for Text based module:

  1. Check in module related locations: Template:[[module's folder]/css] -> Template:[mod_text/css] -> Template:[mod_general/css] -> Core:[[module's folder]/template/css] -> Core:[base/text/template/css] -> Core:[base/general/template/css]
  2. Check it system locations: Template:[system/css folder] -> Core:[template/css].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants