Welcome Guest, Not a member yet? Register   Sign In
Load the 404 page from a controller
#1

[eluser]Tim Reynolds[/eluser]
Hi,

I am sure there is a simple way to do this but could not find it in the guide. I have a default controller that takes the first uri segment and if it is not a controller checks a pages db and loads it from there.

This controller can return nothing if the page is not in the db. How do i point this at the normal 404 page in 'application/errors'? or is it easier to copy the errors into the views?

Thanks
Tim
#2

[eluser]Keem1[/eluser]
Did you try this?

Code:
show_404('page');
#3

[eluser]Tim Reynolds[/eluser]
Thats great thanks
#4

[eluser]Tim Reynolds[/eluser]
How would i call the other standard error pages say error_db?
#5

[eluser]Keem1[/eluser]
[quote author="Tim Reynolds" date="1240086616"]How would i call the other standard error pages say error_db?[/quote]

Use this method for other error messages:
Quote:show_error('Your custom error message goes here!');
#6

[eluser]Keem1[/eluser]
I missed the topic, and deleted this post's content!




Theme © iAndrew 2016 - Forum software by © MyBB