Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

How to create new views in the CMS

edited April 2014 in Installation
I'm playing around with the CMS and trying to create new views from it. I created a new page called test/testing, added a bit of text in it and saved. The database updated correctly with the values I entered. However, if I go to mysite.com/test/testing, I get these errors:

"A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 1
Filename: core/Router.php
Line Number: 93

An Error Was Encountered
Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid."

The site works perfectly fine when I load views that I physically created before adding the CMS in. Is it possible to create new content from the CMS without adding a physical view file first?

Comments

  • edited 9:46AM
    Yes. You don't need a view file to display a page and vice versa. Pages with the same location as a view take precedence though. Have you by chance changed the value of the 404_override in the routes.php file?
  • edited 9:46AM
    Yes, I did change the 404_override. I just tried changing it back to the original 'fuel/page_router' and it works well now. I didn't know it used the 404 setting to grab the pages from the DB.

    Now, I have a template that I use in my physical view files, is there an easy way to import that into fuel so I can use the same styling on my pages generated from the DB?
  • edited 9:46AM
    OK, I seem to have it figured out. Looks like I'm all set for now. Thanks!
Sign In or Register to comment.