This patch includes a preprocess function in addition to a twig template file. I also added a directory menu.inc within core/themes/stark/templates/ and placed the new template there.

CommentFileSizeAuthor
d8tts-menu-overview-form.patch3.34 KBEVIIILJ
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

podarok’s picture

Status: Needs review » Fixed

looks good

Thanks!

commited / pushed to front-end

Status: Fixed » Closed (fixed)

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

jenlampton’s picture

Component: Twig templates » Twig templates (front-end branch)
Status: Closed (fixed) » Needs work

This isn't really want we want.

A template file that contains

{{ table }}
{{ children }}

Isn't really much help to anyone.

At the very least, we should be calling theme('table') (or including table.html.twig) here with the correct variables passed in. A theme dev won't be able to do anything with this file as it is.

EVIIILJ’s picture

Isn't really much help to anyone.

I agree but I thought the initial intention was to get Twig working. Only after it's working should we refactor the code.


At the very least, we should be calling theme('table')

I'm confused. The preprocess function does call theme('table'). Are you meaning call if from the template? I didn't know that was possible.


@jenlampton - If we just pass the variables to the table.twig template it will not format them correctly as with the theme('table') function. Not sure how to proceed without including all of the code from theme('table') within this preprocess function to then pass to the template as seperate variables to then use within the table.twig template.
EVIIILJ’s picture

Issue summary: View changes

Added reference to the added menu.inc directory