[TwigComponent] Adding components to a bundle #2319
Replies: 2 comments
-
Bundle anonymous components are automatically registered from bundle --> https://symfony.com/bundles/ux-twig-component/current/index.html#anonymous-components-1 If you need to register component with classes, you need to register them in your bundle Extension and use the bundle namespace in the template path of your Attribute |
Beta Was this translation helpful? Give feedback.
-
| QWCMSAdmin:DashboardCard | | @QWCMSAdmin/components/DashboardCard.html.twig | Anon | The "standard" namespace for your Bundle is So |
Beta Was this translation helpful? Give feedback.
-
I've looked around at a lot of examples, but I don't seem to get Twig components working in my bundle.
They keep popping op as "anomynous".
I found somewhere I need to do this:
but alas, not working.
Can someone point me to a good example/tutorial?
Update
I actually made a error in the namespace of the php file..
But now I have a duplicate component:
Beta Was this translation helpful? Give feedback.
All reactions