0

I need to create a new page for my custom component, however I don't want (and I don't need) to create a new view for that. I know that this can be achieved by creating layouts; the problem is that my layouts lead me to a 404 error.

I created a layout called thumbnails.php

My path: com_gallery/views/tmpl/thumbnails.php

I access it by this URL: [root]index.php?option=com_gallery&view=gallery&layout=thumbnails

It seems that all is set correctly, but still I get a 404 error.

Do I have to register the layout or something?

1 Answer 1

1

Normally view layouts should be placed in view layout directory. In your case it's components/com_gallery/views/gallery/tmpl

1
  • I actually had this setup before asking the question, I just forgot to add "gallery" to the path on my post; however it wasn't working but now it does. I don't know what's changed. Maybe something was cached or I don't know. Commented Apr 20, 2020 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.