Loading a block from an Advanced Module

edited November 2014 in Share
Can you load blocks and assets from the application folder into an advanced module? We used to do this in 0.9.3 with just something like:

<?=$this->load->view("_blocks/" . SYSTEM_FOLDER_NAME . "/header-bar")?>

but in 1.1 when I try to do this I get this error:

Severity: Notice

Message: Undefined property: MY_Loader::$menu



  • edited 3:13AM
    The line is has a problem with is:

    echo $this->menu->render($secondaryMenu, 'active', NULL, 'basic');

    but I can't figure out why it cannot render/use the menu class?
  • edited 3:13AM
    Is this being called in a controller or a view file? If a view file try using $CI instead of $this since $this refers to the controller. Also, has the menu class been loaded using $CI/$this->load->library('menu')?
  • edited 3:13AM
    Ok I think it was mostly loading the menu class from the controller. Thanks!
  • edited November 2014
    On a related but not really the same note, has the way to load the the site variables model changed?

    We are loading from the controller this way:

    this->load->module_model(FUEL_FOLDER, 'sitevariables_model');

    but when I go to the view it gives me this error:

    Unable to locate the file: sitevariables_model.php
  • edited 3:13AM
    Seems like it was renamed and so

    $this->load->module_model(FUEL_FOLDER, 'fuel_sitevariables_model');

    should work?

    Except I am still getting errors which I am not sure are related to this or something completely different but this is what I'm getting:

    Message: Undefined property: Checkout::$sitevariables_model
  • edited 3:13AM
    The model names were renamed for version 1.0. The second error seems to probably be related in that it's looking for a sitevariables_model and it may need to be fuel_sitevariables_model.
Sign In or Register to comment.