Kohana 3.2 with Kostache Mustache.
I'm new on this.
I have this in a view
$this->config = Kohana::$config->load('information');
if(isset($this->config["techinfo"][Request::current()->param('product')]))
{
$response['techinfo']['param']=$this->config["techinfo"][Request::current()->param('product')]["param"];
}
In Information.php, I have a lot of data, like name, value, param and other stuff. Don't ask me why. This file has only a simple return array with data information inside.
What this does: the name of the array value is the same the name of the url product. So if it is /brand/category/product-A
, the information is from product-A, and if it is /brand/category/product-B
is his information that comes.
Template file has only {{#product}}{{#techinfo}}{{param}}{{/techinfo}}{{/product}}>
Saying again: Don't ask me why, but it works. I've got this site this way.
My problem: I need to use the same file to get information. I can do this, but only if I duplicate de data. And I don't want to do this.
In a newer view, but the $this->config = Kohana::$config->load('information');
it's the same.
But how I got de data from there?