Hello Trongate,
To build a CMS, is there any way to 404 error route in to default controller and how to view CMS url database content if there no module and controller?
How to 404 error route default controller.
4 years ago
4 years ago
#1
4 years ago
#2
Hi there,
You may need to rephrase your two questions better for me to understand exactly what you are after but let me have a guess at it...
The default 404 error message is sent to the Templates module where you will find the error_404($data) method, this will pass $data to a view file in templates/views/error_404.php. You could change this view file to what ever you want to display. Also, Trongate's Core.php file calls a private method called draw_error_page, which loads the same template as above.
This question makes no sense to me; 'how to view CMS url database content if there no module and controller?' My quick answer would be, you can't if it doesn't exist.
You may need to rephrase your two questions better for me to understand exactly what you are after but let me have a guess at it...
The default 404 error message is sent to the Templates module where you will find the error_404($data) method, this will pass $data to a view file in templates/views/error_404.php. You could change this view file to what ever you want to display. Also, Trongate's Core.php file calls a private method called draw_error_page, which loads the same template as above.
This question makes no sense to me; 'how to view CMS url database content if there no module and controller?' My quick answer would be, you can't if it doesn't exist.
4 years ago
#3
Yes would have to agree with DaFa on the CMS question.
Why would you have a table in the database and not have a module?
The purpose of the module, controller and view files, are for you to manage the table.
Why would you have a table in the database and not have a module?
The purpose of the module, controller and view files, are for you to manage the table.
4 years ago
#4
hello i will try this . but its not working show error .
if there is some user enter something to the url that is not exist . i wont to redirect them default controller.
if there is some user enter something to the url that is not exist . i wont to redirect them default controller.
4 years ago
#5
Hmm.. I think we have a language barrier we need to overcome - so I'll try keep this simple:
DC's suggestion is great - open error_404.php which resides in
DC's suggestion is great - open error_404.php which resides in
4 years ago
#6
I try this but there is error
4 years ago
#7
I was able to reproduce the error on Trongate v1.3.3036
investobd, you can also try:
at the start of 'error_404.php' file
investobd, you can also try:
at the start of 'error_404.php' file
4 years ago
#8
Thank you very much. Its work fine.