This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi guys, I am overriding component function of different plugin in my custom plugin. Basically I extend old plugins component class, where I put updated function. This works fine.
My issue is that new component can't find partials of original component. I need to copy them to new component. Is there any way to address these partials without copying them?
Thank you in advance
Hi Kiko,
In this instance, you should copy the partials. Creating this kind of cross dependency is not a reliable method of component development.
I hope this helps.
Yeah, I thought so. Thank you for your reply.
Although I am not sure if I understand the risks of it if it would be possible. Is it just that there will too much possible cross dependancy and therefor it can create a mess or is it something specific?
Yes that's right. It would make the system unpredictable when updating and therefore unstable.
Depending on your circumstance, component partials are generally designed for a sample use case and it is better to stick with theme partials instead. So in theory you don't need to copy anything for a custom use case and extending the component base class is all you need.
1-4 of 4