It looks like you're new here. If you want to get involved, click one of these buttons!
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
Class Pattern_categories extends CI_Controller {
function __construct()
{
parent::__construct();
}
function index($categoryId = null)
{
// set your variables
$vars = array('page_title' => 'Check out our list of patterns | Campbell Custom Coatings');
if(!is_null($categoryId)) {
//$this->load->model('pattern_categories_model'); // IF I UNCOMMENT THIS LINE I GET THE ERROR
//$vars['patterns'] = $this->pattern_categories->get_patterns_by_id($categoryId);
}
// use Fuel_page to render so it will grab all opt-in variables and do any necessary parsing
$page_init = array('location' => 'pattern_categories', 'render_mode' => 'cms');
$this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init);
$this->fuel_page->add_variables($vars);
$this->fuel_page->render();
}
}
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Pattern_categories_model extends Base_module_model {
public $record_class = 'Pattern_category';
function __construct()
{
parent::__construct('pattern_categories');
}
Comments
I take it the problem is that I cannot use a model that extends Base_module_model because those are used for the admin side of things correct?
require_once(FUEL_PATH.'models/base_module_model.php');
Fatal error: Class 'CI_Model' not found in /Users/michaelsilvestre/git/hightech5/fuel/application/core/MY_Model.php on line 35
Fatal error: Class 'CI_Model' not found in /Users/..../core/MY_Model.php on line 35
does anyone know what i'm doing wrong?