Ok, here is the problem:
I have a search that gets results from server through ajax and I need to be able to include a view file with variable for each result.
Each result block would be included normally like this:
{include file={#modules_box#} foo="bar"}
How can I parse a codeigniter template file in javascript to pass correct 'foo' and show the results properly? I can go through each object in included template and replace those with search results but it is lengthy ('foo' is an object) and it creates lengthy task if modules_box view is updated later on.
Or am I looking from very wrong point of view? Should it be done differently?