From @lauriii in #216 in #3111409: Add new Olivero frontend theme to Drupal 9.1 core as beta

 +++ b/core/themes/olivero/templates/block/block--secondary-menu--plugin-id--search-form-block.html.twig
@@ -0,0 +1,43 @@
+<div{{ attributes.addClass(classes) }}>
+  {{ title_prefix }}
...
+    <h2{{ title_attributes }}>{{ label }}</h2>
...
+  {{ title_suffix }}

 
These are missing from the available variables list.

Comments

mherchel created an issue. See original summary.

mherchel’s picture

Title: [Code Review] Missing variables in block--secondary-menu--plugin-id--search-form-block.html.twig » [Olivero Code Review] Missing variables in block--secondary-menu--plugin-id--search-form-block.html.twig
Project: Olivero » Drupal core
Version: 8.x-1.x-dev » 9.1.x-dev
Component: Code » Olivero theme
Priority: Normal » Minor
mherchel’s picture

Title: [Olivero Code Review] Missing variables in block--secondary-menu--plugin-id--search-form-block.html.twig » Missing variables in Olivero's block--secondary-menu--plugin-id--search-form-block.html.twig
sarvjeetsingh’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Added the missing variables. please review.

mherchel’s picture

Status: Needs review » Reviewed & tested by the community

This looks great!

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/olivero/templates/block/block--secondary-menu--plugin-id--search-form-block.html.twig
@@ -7,6 +7,12 @@
+ * - title_attributes: Same as attributes, except applied to the main title

This is referencing attributes variable but that isn't documented here 🤔

anmolgoyal74’s picture

StatusFileSize
new1.15 KB
new837 bytes

Added documentation for parent variable "attributes"

anmolgoyal74’s picture

Status: Needs work » Needs review
abhijith s’s picture

Patch #7 applies cleanly.But the description of label variable is missing.

abhijith s’s picture

StatusFileSize
new1.2 KB

Added the missing label description.Please check it.

mherchel’s picture

Status: Needs review » Reviewed & tested by the community

This looks great to me. Thanks!

  • lauriii committed 2bdcc0f on 9.2.x
    Issue #3176912 by anmolgoyal74, Abhijith S, sarvjeetsingh, mherchel:...

  • lauriii committed 0103378 on 9.1.x
    Issue #3176912 by anmolgoyal74, Abhijith S, sarvjeetsingh, mherchel:...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2bdcc0f and pushed to 9.2.x. Also cherry-picked to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

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