Home page through the CMS

edited September 2011 in Feature Requests
Is it possible to create a editable home page through the CMS. I have seen the post about creating a controller to take care of this. Is that the best way?

Comments

  • edited 5:20PM
    sure... You can login to the admin and go to the pages module. Click the "Create" button and type in "home" for the location name.
  • edited 5:20PM
    Thanks for the reply. That's worked perfectly.

    Is that anywhere in the documentation? If not is there a way we can contribute to the documentation?
  • edited 5:20PM
    Not in an obvious spot. When you mouse over the "Location" field label it says it.

    Contributions are always welcome. The easiest way is to do a pull request in GitHub:
    http://help.github.com/send-pull-requests/

    The fuel/modules/user_guide module contains the same documentation as what is in the site so feel free to make edits there and then send in your pull requests.
  • edited 5:20PM
    The home page that I created through the CMS uses the main.php layout file. This in turns loads a block using

    <?php $this->load->view('_blocks/second_menu'); ?>

    The block second menu works fine when loaded in a regular controller and uses the $CI instance as I asked about here http://www.getfuelcms.com/forums/discussion/442/undefined-variable:-ci/#Item_4

    On the homepage though I get the error

    Message: Undefined property: MY_Loader::$second_model

    Thanks for all the help so far, I do feel like I'm bombarding you with questions.
  • edited 5:20PM
    Did you try using $CI instead of $this to load the second_menu:

    <?php $CI->load->view('_blocks/second_menu'); ?>

    Alternatively, there is a CI() function for those cases where the $CI variable doesn't exists and you want to save a line of code by not declaring $CI =& get_instance(); you can call like this:

    <?php CI()->load->view('_blocks/second_menu'); ?>

    For whatever reason, I rarely used this method, but does make it a little more convenient.
  • edited 5:20PM
    I tried both combinations but I'm still getting the same error.

    Thanks for the reply.
  • edited 5:20PM
    Have you loaded the 'second_model' yet?
    $CI->load->model('second_model'))
Sign In or Register to comment.