Regular custom change in template

fred_wehnert2
13 Posts
fred_wehnert2 posted this 05 February 2024
Ask a Question

Is there a way to place custom code so that it will load with the template pages but continue to be available when updating the template?

Or do I have to go and edit the files for each time I upload a new version of the template?

An example is if (($this->error->getCode()) == '404') {

header('Location: ' . Jroute::_("index.php?option=com_content&view=article&id=XXItemid=YY", false));
exit;

}

Which I add to the error.php file in the template but each time I update the template I have to go in and manually edit the file.

Is there a way to place custom code so that it will load with the template pages but continue to be available when updating the template? Or do I have to go and edit the files for each time I upload a new version of the template? An example is if (($this->error->getCode()) == '404') { header('Location: ' . Jroute::_("index.php?option=com_content&view=article&id=XXItemid=YY", false)); exit; } Which I add to the error.php file in the template but each time I update the template I have to go in and manually edit the file.
Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 05 February 2024

Alfred,

You can try to put it in the PHP Element.

...................................................
Sincerely,
Alan R.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Alfred, You can try to put it in the PHP Element. ................................................... Sincerely, Alan R. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments