Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a child issue of #2660058: [meta] Convert controller content to twig {% trans/endtrans %} templates per module
Problem/Motivation
Defining render arrays for static content in controllers is awkward. Let's use twig templates!
See the parent issue for instructions on how to convert the controller to use twig templates.
This issue covers the page_example module.
Note that PageExampleController
has a description()
method, which is the only content method we want to change. simple()
and arguments()
demonstrate techniques so we should leave them alone.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#5 | 2799529-5.patch | 2.72 KB | navneet0693 |
| |||
#3 | 2799529-3.patch | 2.75 KB | navneet0693 |
|
Comments
Comment #2
Mile23Comment #3
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commentedComment #4
jeevanbhushetty CreditAttribution: jeevanbhushetty at QED42 commentedAdd new line
Comment #5
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commentedComment #6
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commentedComment #7
jeevanbhushetty CreditAttribution: jeevanbhushetty at QED42 commentedlook good.
Comment #9
Mile23Committed and pushed. Thanks!