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 Patterns extends CI_Controller {
function index($categoryId = null)
{
$vars['catName'] = "";
$this->load->model('patterns_access_model');
if(!is_null($categoryId)) {
$vars['patterns'] = $this->patterns_access_model->get_patterns_by_id($categoryId);
$vars['catName'] = $this->patterns_access_model->get_category_by_id($categoryId);
}
// set your variables
$vars = array('page_title' => 'Check Out Our List Of '.$vars['catName'].' Patterns | Campbell Custom Coatings');
// use Fuel_page to render so it will grab all opt-in variables and do any necessary parsing
$page_init = array('location' => 'patterns', 'render_mode' => 'cms');
$this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init);
$this->fuel_page->add_variables($vars);
$this->fuel_page->render();
}
}
<h1>CatName = <?php echo $catName; ?></h1>
<h1>CatName = {$catName}</h1>
Comments
$vars = array('page_title' => 'Check Out Our List Of '.$vars['catName'].' Patterns | Campbell Custom Coatings');
overrights my vars['catName'] declaration.I should have gotten some sleep before posting on here. Thanks anyways.