![]() |
Extending display() array with html content - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Extending display() array with html content (/showthread.php?tid=30087) |
Extending display() array with html content - El Forum - 05-03-2010 [eluser]atrioom[/eluser] Hi CI-Community, Following problem i have come accross: We have a bunch of translators working in our databases. For easier comparison of DB-Content and Look and Feel on the website I wanted to make it easier for them to reference these two sections. The best way I can think of doing this is appending the element-name (as in the DB) of the substituted text-block in an HTML-Comment after or before it starts. So for every element there is in the display array i want to append its own index as HTML-Content after/before the element just before output. I am mediocre good in PHP and semi-versatile in CI. I looked over the display and the fetch function, the Model Class, etc... but couldnt find a place i feel comfortable working this piece of code into. What do you think of the idea itself and if its good, where could i implement this? Thank you in advance, Alex Extending display() array with html content - El Forum - 05-03-2010 [eluser]atrioom[/eluser] Okay, I figured where I could enventually put all this. Beside the fetch() and the display() function I created the function append_comment() in 'tlib_page_data.php': Code: function append_comment($array = FALSE) append_comment() gets called within the display() function like this: Code: $this->tvar_query_data = $this->append_comment($this->tvar_query_data); With the exludes-array its possible to keep the script from destroying the stylesheet link for example. This is pure beta and still very buggy... I will have to play around with the excludes a lot to get this working, but it's a start... Extending display() array with html content - El Forum - 05-03-2010 [eluser]atrioom[/eluser] --- CLOSED --- |