Deleting the Home.php in Controller and Welcome_message |
Hi there.
I just want to bring something under your attend, and maybe I might be at fault here. I am trying to build my very own cms and is busy using bootstap 4 for it and your online manual for cdi4. And here is the problem I have the online manual. 1) I want to to get rid of the Home.php controller and replace it with a Pages.php in the controller and replace the welcome_message in the views folder. As per the online manual. But every time I try this I get the following message "Whoops, We seemed to have hit a snag. Please try again Later..." I have created a pages folder and have put inside that folder a home.php and a about_us.php files. Please could you explain to me what I did wrong ? ( As i did copy the code from the codi4 website.) Francois
Take a look and amend the ./apps/Config/Routes.php, rem out the welcome_message and add a route to the Pages Controller.
(04-22-2020, 02:27 AM)John_Betong Wrote: Take a look and amend the ./apps/Config/Routes.php, rem out the welcome_message and add a route to the Pages Controller.Hi John. Please see the screen shot I have taken. I am doing my cms webpage dosing on my laptop. Do you think it could be a bit slow ? Francois
I do not understand your comment.
Try adding echo __file__; die; to the /Controllers/Page.php, make sure it is being called then proceed slowly by revealing more script.
(04-22-2020, 03:50 AM)John_Betong Wrote: I do not understand your comment.There is something not right in codeigniter. There should be a way to get rid of the welcome_message.php in the view folder. So that you can start working on you home.php file and etc and I don't have a welcome message in the routes.php files. I have also try and set the Pages.php as the default controller. Francois
@shewolf255,
> There should be a way to get rid of the welcome_message.php in the view folder. So that you can start working on you home.php file and etc and I don't have a welcome message in the routes.php files. > > I have also try and set the Pages.php as the default controller. From the supplied image I noticed that Home was replaced with Pages. Did you replace the other Home::index reference further below? Code: /** |
Welcome Guest, Not a member yet? Register Sign In |