Problem(s) with extending pattern in sub theme

Created on 13 December 2023, 7 months ago
Updated 14 December 2023, 7 months ago

I've a CTA with icon pattern in the base theme, in derived theme, I'm extending this pattern to add more option in the pattern.
I pattern definition to extend it as follow

cta_with_icon_site:
  label: site variant of cta with icon
  description: some desc.
  extends: cta_with_icon.settings.button_style
  settings:
    button_style:
      options:
        btn-primary: Primary button
        btn-secondary: Secondary button
        btn-third: Third button

On the pattern listing page I'm getting following error
Twig\Error\LoaderError: Template "modules/contrib/ui_patterns/templates/pattern-cta-with-icon-site.html.twig

is above correct approach or not.
Please not that I've patch from this issue https://www.drupal.org/project/ui_patterns/issues/3335833 🐛 Patterns library doesn't detect other activated theme patterns (only from the basetheme) RTBC is applied to look for pattern in other enabled themes.

One more question, in above options first 2 options are already present in the base pattern, here I'm adding 3rd option.

Another question

💬 Support request
Status

Active

Version

1.0

Component

Documentation

Created by

🇮🇳India Sharique

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Sharique
  • 🇮🇳India Sharique

    I'm able to solve above issue by adding "use" attribute

    use: "@base/main/patterns/cta_with_icon/pattern-cta-with-icon.html.twig"
    

    Now the issue, all other fields and setting not visible in preview and also in pattern mapping in paragraph display modes. Check attached screenshot of preview

Production build 0.69.0 2024