Hi, I’m wondering if there’s a way to use a mixin inside my Plugin’s model fields yaml file?
I’ve tried doing the following…
# seo_fields.yaml
handle: Content\SEOFields
type: mixin
name: SEO Fields
fields:
meta_title:
label: Meta Title
tab: SEO
type: text
meta_description:
label: Meta Description
tab: SEO
type: textarea
# Category fields.yaml
fields:
title:
label: Title
type: text
_seo_fields:
type: mixin
source: Content\SEOFields
But this gives me the error
"The partial '_field_mixin' is not found." on line 97 of
/var/www/html/modules/system/traits/ViewMaker.php
I’m wondering if there’s some sort of trait or something I can use with the model that would allow me to do something like this.
In the meantime I guess I could just copy the seo_fields definition into my fields - but it would be cool if I could do something like the above some how.