![]() |
Template Parser Limited? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Template Parser Limited? (/showthread.php?tid=19782) |
Template Parser Limited? - El Forum - 06-18-2009 [eluser]Mischievous[/eluser] I'm trying to run the template parser through a multidimensional array.... 3 dimensional to be exact. and it doesn't seem to like either the array setup or the parser is incapable of handling such operation. ex: with 2 dimensional... Code: $query = $this->db->query("SELECT * FROM blog"); I need a three dimensional Code: $query = $this->db->query("SELECT * FROM blog"); If anyone has more information about the template parser I would appreciate it! Template Parser Limited? - El Forum - 06-18-2009 [eluser]TheFuzzy0ne[/eluser] Please post your view. Template Parser Limited? - El Forum - 06-18-2009 [eluser]Mischievous[/eluser] Code: <div id='subpage_header'> Template Parser Limited? - El Forum - 06-19-2009 [eluser]Mischievous[/eluser] Bump.... Sorry for that bump but... really need an answer on this. Template Parser Limited? - El Forum - 06-19-2009 [eluser]TheFuzzy0ne[/eluser] Is there any reason you can't just use a foreach loop for now? Template Parser Limited? - El Forum - 06-19-2009 [eluser]Mischievous[/eluser] No, I can definitely hard code it... would just like to have the separation between the code and template of the page.... Template Parser Limited? - El Forum - 06-19-2009 [eluser]TheFuzzy0ne[/eluser] I know where you're coming from. I needed to take a break from what I was doing, so here's what I came up with. ./system/application/controllers/mdarray_parse_demo.php Code: <?php ./system/application/views/mdarray_parse_demo.php Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" Please see attached image for the result. I think the key is to ensure that none of the sub arrays have a key matching any of the keys in the parent arrays (hope that makes sense). Template Parser Limited? - El Forum - 06-19-2009 [eluser]Mischievous[/eluser] Ok... I'll be looking over your code and trying to figure out how the parser is going through that compared to what I have and why its not going through it... The difference that I am working with is that I am pulling a result_array from a mysql query.... not having a static array??? Erm... I'll look through it and post my results! I appreciate you taking your time to do that for me! Template Parser Limited? - El Forum - 06-20-2009 [eluser]Phil Sturgeon[/eluser] There is a massive issue with key names I spotted while working on my HelpfulParser. If anything has the same key name as an item higher up in the view data array, it will simply be ignored. Template Parser Limited? - El Forum - 06-20-2009 [eluser]TheFuzzy0ne[/eluser] [quote author="TheFuzzy0ne" date="1245453102"]I think the key is to ensure that none of the sub arrays have a key matching any of the keys in the parent arrays (hope that makes sense).[/quote] ![]() At least that confirms I'm not crazy. Thanks. |