Download & Extend

Convert theme_node_search_admin to twig

Project:Drupal 8 Twig Sandbox
Component:Twig templates (front-end branch)
Category:task
Priority:normal
Assigned:WebDevDude
Status:needs work
Issue tags:Needs Update Documentation

Issue Summary

Needs template_preprocess and template

Comments

#1

Status:active» needs review

This patch was created following the work submitted in other patches, so I'm not sure if doing a preprocess on both 'table' and 'form' is necessary.
If both variables should be provided to the twig template, are these valid descriptions?

table: The table of the settings.
form: The submit button.

Thank you.

AttachmentSize
convert_theme_node_search_admin-1825690-1.patch 1.78 KB

#2

Status:needs review» needs work

+++ b/core/themes/stark/templates/node/node-search-admin.html.twigundefined
@@ -0,0 +1,17 @@
+* - table: The table of the settings?????
+* - form: The Submit button??????

this needs better documentation

all other looks good

#3

Thanks @podarok.

Updated documentation:

before:

+* Available variables:
+* - table: The table of the settings?????
+* - form: The Submit button??????

now:

+* Available variables:
+* - table: The table of the settings.
+* - form: A render element representing the form.
AttachmentSize
convert-theme_node_search_admin-to-twig-1825690-3.patch 2.01 KB

#4

Status:needs work» needs review

Updating Status.

#5

Component:Twig templates» Twig templates (front-end branch)
Status:needs review» needs work

A template file that contains

{{ table }}
{{ form }}

Isn't useful to font end devs. There's no markup in here. At the very least we should be calling theme('table') from inside this template, and passing in the appropriate variables.

I'm going to commit this as-is so that we can get something working in the sandbox, but we should revisit how to handle these components later on.

nobody click here