Page 1 of 1

Override ADmin and system files

Posted: Sun May 01, 2022 10:46 am
by radhavallabh
Hi;
I am using 1.0.8.14 version-

I wanted to know if we could override a system/versioned/1.x.x.x file and system/segment/ file by duplicating them in the override folder with same corresponding location.

Also I wanted to know how to override a admin action file, can you please guide me on how to override a admin file?

Thank you in advance;
Very Warm regds./
radhavallabh

Re: Override ADmin and system files

Posted: Sun May 01, 2022 4:11 pm
by ecartz
You cannot override segment files by duplicating them. Just change the thing that calls them instead. This is often a database hook, which you can change in phpMyAdmin or similar.

You can override classes from system/versioned/whatever by putting them in system/override -- but if there's a language file, you have to copy that into the corresponding location in the language directory tree.

There's isn't a way to override an admin action file. You either need to catch the action at the preAction stage and redirect it or add your change to the action hook.