Overriding core block's add and edit forms from a package?
Permalink
Hello all
I'm trying to override the Page List's add and edit forms using a package with this structure:
/packages/my_package/blocks/page_list/add.php
/packages/my_package/blocks/page_list/edit.php
but the overrides don't work. The package installs correctly (along with a custom template, tool and db.xml update which all work), but these two overrides do nothing.
Can anyone point me in the right direction? I assumed this would Just Work as overrides are usually pretty straightforward.
I'm trying to override the Page List's add and edit forms using a package with this structure:
/packages/my_package/blocks/page_list/add.php
/packages/my_package/blocks/page_list/edit.php
but the overrides don't work. The package installs correctly (along with a custom template, tool and db.xml update which all work), but these two overrides do nothing.
Can anyone point me in the right direction? I assumed this would Just Work as overrides are usually pretty straightforward.
Thanks John, I'll look into overrideCoreByPackage().
My package is (at present) just a 'related project' (open source) so the Marketplace isn't an issue. That might change in the future, though.
My package is (at present) just a 'related project' (open source) so the Marketplace isn't an issue. That might change in the future, though.
Hmm it's quite annoying it turns out. Looks like I'll just need to put it together as a block rather than an installable package as that seems to get round the overrides problem easily.
However, there are also approval issues if you want to override the core from a marketplace addon.
In my Country State Manager, I originally built it to do overrideCoreByPackage() and provide an easy installation, but it was judged 'not approvable' for using that method.
In the end I added code to the installer to ask users to copy helpers into the root as part of the installation process. Even so, because it involved core overrides, it had to be classed as a black addon.
I am currently questioning the policy that led to this and awaiting a final reply.