[eluser]JanDoToDo[/eluser]
Hi guys,
I have four sections in my treeview. When I display the page with the first 3 sections it works. When i add the 4th section it breaks and doesnt even error, it just goes straight to "page cannot be displayed". Ive never seen this behaviour before so would like some help.
I load the data from MySQL for each of the four sections:
Code:
$x['ref_categories'] = $this -> references -> get_resources('category', array('category_for' => 'reference', 'active' => 1), $language_id, 'order');
if ( ! empty($x['ref_categories'])) :
foreach($x['ref_categories'] as $id => $ref):
$x['ref_categories'][$id]['url'] = 'references/categories/' . $ref['url_key'];
// Get products that relate to this category
$refs = $this -> references -> get_reference_list($ref['category_id'], $this -> default_language, FALSE, FALSE, 'categories');
foreach ($refs as $ref) :
$ref['url'] = 'references/details/' . $ref['url_key'];
$x['ref_categories'][$id]['new_references'][] = $ref;
endforeach;
endforeach;
endif;
$x['ref_parameters'] = $this -> references -> get_resources('parameter', FALSE, $language_id, 'parameter_title');
if ( ! empty($x['ref_parameters'])) :
foreach($x['ref_parameters'] as $id => $ref):
$x['ref_parameters'][$id]['url'] = 'references/parameters/' . $ref['url_key'];
// Get references that relate to this parameter
$refs = $this -> references -> get_reference_list($ref['parameter_id'], $this -> default_language, FALSE, FALSE, 'parameters');
foreach ($refs as $ref) :
$ref['url'] = 'references/details/' . $ref['url_key'];
$x['ref_parameters'][$id]['new_references'][] = $ref;
endforeach;
endforeach;
endif;
$x['prod_categories'] = $this -> products -> get_resources('category', array('category_for' => 'product', 'active' => 1), $language_id, 'order');
if ( ! empty($x['prod_categories'])) :
foreach($x['prod_categories'] as $id => $ref):
$x['prod_categories'][$id]['url'] = 'products/categories/' . $ref['url_key'];
// Get products that relate to this category
$prods = $this -> products -> get_product_list($ref['category_id'], $this -> default_language, FALSE, FALSE, 'categories');
foreach ($prods as $prod) :
$prod['url'] = 'products/details/' . $prod['url_key'];
$x['prod_categories'][$id]['products'][] = $prod;
endforeach;
endforeach;
endif;
$x['prod_parameters'] = $this -> products -> get_resources('parameter', FALSE, $language_id, 'parameter_title');
if ( ! empty($x['prod_parameters'])) :
foreach($x['prod_parameters'] as $id => $ref):
$x['prod_parameters'][$id]['url'] = 'products/parameters/' . $ref['url_key'];
// Get products that relate to this parameter
$prods = $this -> products -> get_product_list($ref['parameter_id'], $this -> default_language, FALSE, FALSE, 'parameters');
foreach ($prods as $prod) :
$prod['url'] = 'products/details/' . $prod['url_key'];
$x['prod_parameters'][$id]['products'][] = $prod;
endforeach;
endforeach;
endif;
And then i call the view and load this view page which is echoed back to the controller to a variable: