How do I create pages

#1
[eluser]JasonS[/eluser]
Sorry for the rather dumb title, my mental facilities are somewhat depleted on a Friday afternoon.

Currently this happens. (I think)

page is routed -> router looks for controller -> if controller doesn't exist throw 404.

I want this to be modified to the following.

page is routed -> router looks for controller -> if controller doesn't exist load the page controller

I assume this has been done many times before. Is anyone willing to share what they have or could someone tell me which system library / function would need to be extended.

Thanks,

Jason

#2
[eluser]theprodigy[/eluser]
The library that needs to get extended is the system/libraries/Router.php file, and I believe the function would be _validate_request($segments) (starts on line 198, but I think the lines that would need to be modified are 218 & 239 (and yes, I am advising you would do this through extending the library, not modifying the code in the core library Wink )

#3
[eluser]JasonS[/eluser]
Thanks a lot, I will look into this later today.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.