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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mile23 created an issue. See original summary.

Mile23’s picture

navneet0693’s picture

Status: Active » Needs review
FileSize
2.75 KB
jeevanbhushetty’s picture

Status: Needs review » Needs work
+++ b/page_example/templates/description.html.twig
@@ -0,0 +1,15 @@
\ No newline at end of file

Add new line

navneet0693’s picture

navneet0693’s picture

Status: Needs work » Needs review
jeevanbhushetty’s picture

Status: Needs review » Reviewed & tested by the community

look good.

  • Mile23 committed f9386fb on 8.x-1.x authored by navneet0693
    Issue #2799529 by navneet0693, jeevanbhushetty: Convert...
Mile23’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.