Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Is there any way to set 404 template in the modules?
  • Dear sir,

    I would like to set my 404 template to my modules.

    However, it always gives me wrong one.

    Do you why?

    Where I place my 404.php is /modules/admin/views.

    Am I placing wrong?

    Best regards,
    Masao
  • HarroHarro
    Accepted Answer
    That depends on how you have handled your 404's.

    Normally you define a _404_ route to a controller method, that method can do whatever it wants, including loading a view. 

    If your controller is not in the admin module, you need to specifically tell the View class to load it from the module by using "admin::view/name/here". Note that this is bad design, you should never create a hard coupling between modules, or the app and a module.
  • Dear Harror,

    Thank you for your quick response.

    I understand your suggestion.

    I had better not creating hard coupling between modules, or the app and so on.

    Thanks for that.
    Masao


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion