I edited \components\com_content\views\article\tmpl\default.php file to suit my needs, and to output a customized string instead of the default H1 header. The site was running all OK, but when I created a new menu item that I needed, using the backend admin interface, I lost the PHP file default.php modifications, and it got restored to it's initial values. Why did this happen ?

  • Welcome to JSE. Please take our tour and consider giving your account a more "human" name.
    – mickmackusa
    Aug 22 '20 at 23:03

I have a hard time believing that the file was updated when creating a new menu item. It was more likely updated when updating Joomla. And that is expected. You should never modify core files, they will be overwritten when updating.

Instead you should create a copy of the template and then create layout overrides. There is plenty of documentation regarding this topic:





Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.