0

I want use function drupal_render_children in file *.html.twig Drupal 8. What solution for do ?

  • You don't need to do this. It should be built in to print {{ children }} in a twig template if that render array has children or whatever key of the render array has children. – mradcliffe Mar 3 '17 at 19:45
  • 1
    sure ! variable {{ children }} working ! Thanks for your share ! – Henry Tran Mar 4 '17 at 2:18
  • Which variables should be affected to children ? – Promo Mar 8 '17 at 12:56
1

Well, for one, it is deprecated. Two, you cannot use PHP functions directly within the Twig template.

You can implement the appropriate preprocess hook to do this, to pass to Twig as a variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.