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 11:19AM
    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 11:19AM
    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 11:19AM
    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 11:19AM
    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 11:19AM
    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 11:19AM
    I tried both combinations but I'm still getting the same error.

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