⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to put js files css file for GC on controller



DREON
  • profile picture
  • Member

Posted 08 April 2013 - 14:15 PM

Good day to all, i wan t to ask a best way or example to put this on my controller

 

foreach($css_files as $file): ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
    <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>

 

this code is for GC table, i want to put that on one of my controller, because that code affects my template css, js, jquery.


davidoster
  • profile picture
  • Member

Posted 09 April 2013 - 22:31 PM

Via your controller you call a view like so,

 

$this->load_view('my_view_file', $mydata);

 

On this line via $mydata you can pass anything you want.

Just pass tha appropriate css,js files and specific jquery code and just echo them within the view file.