Overriding header_required.php possible?
Permalink
I had to edit the /concrete/elements/header_required.php file for the site I'm working on and I moved it to the /elements folder under the root but it's not overriding. does this work in the latest version or is it still to come?
I don't mind leaving it in the concrete/elements folder but it would help for updating if it wasn't in there.
I don't mind leaving it in the concrete/elements folder but it would help for updating if it wasn't in there.
I found that it's defined in /concrete/config/base.php at line 72 or so:
I think I'll just edit the header_required.php under the concrete's elements folder and put a backup in the root's.
Thanks for the response Scott!
I think I'll just edit the header_required.php under the concrete's elements folder and put a backup in the root's.
Thanks for the response Scott!
That's weird. It _should_ behave exactly as you assumed it would.
In the meantime I would advise just to edit the concrete/elements/header_required.php one and keep a backup, like you're doing. But I'll investigate this one, since it looks to be a bug.
In the meantime I would advise just to edit the concrete/elements/header_required.php one and keep a backup, like you're doing. But I'll investigate this one, since it looks to be a bug.
hi guys, is it possible to override any files which are contained in the elements folder? I want to know does it work the same way as codeignitor or other php frameworks in that it will look in the root folders first and if they are empty then it will look at the folders inside the /concrete subdirectory? I need to update the header_required element but don't want to do it in the concrete/elements folder as it will be changed by upgrades like the above thread mentions. What is the standard practice for overriding files? Thanks
you got it.
thanks for quick reply frz
So it looks like it is looking for the header_required in core as in inside the concrete folder heirarchy, if it isn't there then it loads the outside the concrete directory version, the one that is all dressed up with no date.
This isn't how I would think it should function which makes me think that I almost have to be wrong!
You could swap the DIR_FILES_ELEMENTS and the DIR_FILES_ELEMENTS_CORE in the if statement and get the desired result for now, but then again you'd have to do that everytime :)
I haven't messed with overriding php files with ones outside the concrete directory so this is all theoretical.
If I am entirely wrong which is entirely possible please let me know. I know Remo will!
edit: same syntax in new release.
-Scott
p.s. Hi Remo