Closed (fixed)
Project:
Modal
Version:
4.1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 May 2022 at 17:57 UTC
Updated:
31 Aug 2022 at 02:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
renatog commentedHello @realgiucas how are you?
Thank you so much for using the project
The template override functionality isn't implemented yet but I really thought about it. It should be a very cool feature!
So I'm converting to Feature Request ok?
P.s. We don't have so much time actually but if you want to contribute with that, any patches or merge-requests will be welcome
Comment #3
paulocsWorking on it.
Comment #5
paulocsJust created a MR for it. Please review.
Comment #6
lucasscComment #7
lucasscHi!
I applied MR !24 locally for 9.4.x and works fine.
Steps:
- created a custom module named "test_module";
- file "test_module.module" was created with hook_theme implementation (see "test_module_module_content.txt" attached);
- created "templates" folder inside the test_module;
- file "modal-page-modal.html.twig" was copied to new "templates" folder above;
- then I modified line 26 of "modal-page-modal.html.twig" from
<h4 id="{{ id_label }}" class="modal-title modal-page-title">{{ title }}</h4>to<h4 id="{{ id_label }}" class="modal-title modal-page-title">modifying something</h4>.Attaching screenshots of the results (see before.png and after.png).
I also enabled twig debug so I could see from where the output is coming and the given file names suggestions. (see twig _debug.png)
Comment #9
paulocsThank you!
Comment #10
renatog commentedAwesome. Thank you so much team
Adding the parent for the new release
Comment #11
renatog commentedCreated the ticket #3304196: Create a documentation explaining how to override the twig template where we can put the step-by-step