Automatically patch generated files: How to?
Posted: 2018-08-07 11:58
Hi there,
I am trying to make my changes in hook files only, but there are couple of things which can only be done in overwritable files
.
Is there a way to automatically apply patches to generated files?
To give an example:
The file inc.Common.php contains the following code which shows the "Jump-To" menu on all pages except the homepage:
I want to remove the condition (first and last line of the code) to see the menu on every page, even on the homepage.
or
AppGini will overwrite inc.Common.php on next generation
as long as I do not uncheck the code file
.
So I'm wondering if there is any tool out there which will automatically patch the generated files according to some configurable rules (diff/merge?)
How do others handle this?
Thanks, guys!
Kind Regards,
Jan
PS: Maybe BigProf can add a project setting "[x] hide jump-to menu on homepage" in the next release?
I am trying to make my changes in hook files only, but there are couple of things which can only be done in overwritable files

Is there a way to automatically apply patches to generated files?
To give an example:
The file inc.Common.php contains the following code which shows the "Jump-To" menu on all pages except the homepage:
Code: Select all
<?php if(!$home_page){ ?>
<?php echo NavMenus(); ?>
<?php } ?>
I want to remove the condition (first and last line of the code) to see the menu on every page, even on the homepage.
Code: Select all
<?php echo NavMenus(); ?>
Code: Select all
<?php if(!$home_page || true){ ?>
<?php echo NavMenus(); ?>
<?php } ?>


So I'm wondering if there is any tool out there which will automatically patch the generated files according to some configurable rules (diff/merge?)
How do others handle this?
Thanks, guys!
Kind Regards,
Jan
PS: Maybe BigProf can add a project setting "[x] hide jump-to menu on homepage" in the next release?