Welcome Guest, Not a member yet? Register   Sign In
tinyMca with CI
#5

[eluser]brianw1975[/eluser]
er.... you nearly *always* avoid any form of echo, sprintf, etc from a Model.

A more MVC method would be to do something along the lines of (in your controller)

Code:
class cont exte.......... er{
function .......(){
  if($I_need_to_show_tinymce === true){
     $data['showTinyMCE'] = true;
  }
  $this->load->view("my_view_file.file",$data);

and then in your view file have:
Code:
<?php if($data['showTinyMCE'] === true) ?>
[removed]......... js stuff in here....[removed]
<?php endif ?>

Like I said, prescribed MVC methodologies put down using models to affect views, but only to give and take data for the controllers.


Messages In This Thread
tinyMca with CI - by El Forum - 09-06-2009, 03:46 PM
tinyMca with CI - by El Forum - 09-06-2009, 05:01 PM
tinyMca with CI - by El Forum - 09-06-2009, 05:20 PM
tinyMca with CI - by El Forum - 09-06-2009, 05:28 PM
tinyMca with CI - by El Forum - 09-06-2009, 05:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB