My first Trongate-built web app is almost complete and what a dream it has been to build!
However, I am struggling with something real basic - the default homepage. (I have read the docs but am either missing something or it is a bug).
On my home page, I receive the error message:
ERROR: View file does not exist at: C:/xampp/htdocs/booking_system/modules//views/dashboard.php
In config/config.php I have:
I can view the file perfectly at:
http://127.0.0.1/booking_system/dashboard/index
and...
http://127.0.0.1/booking_system/dashboard/
and...
http://127.0.0.1/booking_system/dashboard
i.e. I have a dashboard module; with a controllers file inside; with a Dashboard.php file and an index function that returns:
Every other page on the site works perfectly, so what am I missing?!
Default Home Page Issue
3 years ago
3 years ago
#1
3 years ago
#2
Sorry......... Solved, 2 minutes after posting this long question.
Had to add:
Many of the functions work without this line of code but it appears it is essential on the home page.
-------------------------
Have now read and understood the the "top tip" at the bottom of this docs page: https://trongate.io/docs/information/passing-view-files-into-templates
Had to add:
Many of the functions work without this line of code but it appears it is essential on the home page.
-------------------------
Have now read and understood the the "top tip" at the bottom of this docs page: https://trongate.io/docs/information/passing-view-files-into-templates
3 years ago
#3
As I was reading your first post my answer was to help the framework with 'view_module' as you need this if you are using custom routes too. However you answered your own question, we'll done!
3 years ago
#4
Thanks Dafa,
To be clear, if the second segment in the URL matches the name of the module where the view file lives then there's no need to declare view_module.
This is why we (in normal use cases!) need to declare view_module on the homepage.
To be clear, if the second segment in the URL matches the name of the module where the view file lives then there's no need to declare view_module.
This is why we (in normal use cases!) need to declare view_module on the homepage.