Override Question

Overrides allow you to change the foundation of your site.
User avatar
Mort_Lemur
Builder
Posts: 135
Joined: Tue Jun 02, 2026 6:12 pm
Phoenix Version: v1.1.0.6
Has thanked: 67 times
Been thanked: 40 times

Override Question

Post by Mort_Lemur »

I'm playing with changing a test site and so far have managed to do everything with zero core code changes.

However, there will come a time where this is not possible and I will need to change the code in a file. Now in this situation I understand that the file should first be copied to the same file structure in the templates/ override directory,which is great as the original code remains unchanged, and Phoenix uses the override version.

What then happens when a Phoenix update comes along which updates that file, or maybe even removes its requirement?

Im assuming that when updating that any changes in the override file would need to be done again to a copy of the new updated file?

Maybe I'm overthinking things



Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
tessthepup
Certified Developer
Posts: 416
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 64 times
Been thanked: 66 times

Re: Override Question

Post by tessthepup »

Mort_Lemur wrote: ↑Sun Jul 05, 2026 2:12 pm I'm playing with changing a test site and so far have managed to do everything with zero core code changes.

However, there will come a time where this is not possible and I will need to change the code in a file. Now in this situation I understand that the file should first be copied to the same file structure in the templates/ override directory,which is great as the original code remains unchanged, and Phoenix uses the override version.

What then happens when a Phoenix update comes along which updates that file, or maybe even removes its requirement?

Im assuming that when updating that any changes in the override file would need to be done again to a copy of the new updated file?

Maybe I'm overthinking things
If you look at templates/default as an example you will see that all files in there are files that can be overriden.

IMO and @burt will probably come along with a more definitive answer but I would say that the files that can be over ridden will most probably never be removed.

User avatar
burt
Core Team
Posts: 4739
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 279 times
Been thanked: 467 times

Re: Override Question

Post by burt »

Overthinking. But thats not a bad thing, especially when starting out.
You're thinking about a hypothetical situation that may never affect you.

Could you give a more `concrete` example, of this "what if" situation -> it'll be a lot easier to then give a proper eaisly understandable answer.



Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply