It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I've implemented the sample files from the simple module tutorial. In the CMS everything is working but on the front-end /articles/{slug} ends up on my default view instead of view/articles.php.
I have also added $pages['articles/:any'] = array('view' => 'articles'); to _variables/global.php
If I add an exit(); at the end of the view/articles.php, the page is displayed correctly.
What is redirecting my view to my default view? And how can I prevent this?
Thanks in advance.
Comments
Did you set this up in a
fuel/application/views/_variables/articles.php
file?Also, is the page redirecting or displaying the wrong view?
Setting this up in _variables/articles.php does not change anything.
/articles/{slug} shows me the view/articles.php
but
/articles shows me my view/_layouts/home.php which is my default view
It's displaying the wrong view, not redirecting.
Did you specify the
$max_page_params
in thefuel/application/config/MY_fuel.php
?Yes, I tried all 4 "Finding the View" from the tutorial, but no effect.
This is my views/articles.php. URL without a slug only works with an exit(); at the end.
I'm having a hard time replicating your issue. Do you have a page called "articles" created in the Pages module that may be interfering?
Nope, all my pages are in dutch ;-)
Will it help if I create a controller for it. Like @almostcompletely suggested in one the tickets?
A controller should supersede the automatic view mapping so yes, you can try that.