Welcome Guest, Not a member yet? Register   Sign In
Help me for this library
#1

(This post was last modified: 03-12-2015, 12:00 AM by Vimal.)

I am using HMVC extension with COdeigniter 3 rc3

And also this lib.
http://www.grocerycrud.com/codeigniter-simplicity

I know this is for old version but its working fine in ci3.
My problem is.
When I use its default given controllers and view in modules with its working fine. And when i use my own controllers and views its working but css and js file not loaded with it. Its show nothing..
PHP Code:
class Test extends MX_Controller {
 
   //put your code here
 
   public function __construct()
 
   {
 
       parent::__construct();
 
   
        $this
->_init();
 
       
    
}
 
   
    private 
function _init(){
 
       
    $this
->output->set_template('test');
 
    $this->load->js('assets/themes/default/js/jquery-1.9.1.min.js');
 
       $this->load->js('assets/themes/default/hero_files/bootstrap-transition.js');
 
       $this->load->js('assets/themes/default/hero_files/bootstrap-collapse.js');
 
       $this->load->css('assets/admin/bower_components/bootstrap/dist/css/bootstrap.min.css');
 
   
    
}
 
   
    public 
function index()
 
   {
 
       $this->load->view('testview');
 
       
    
}
 
   



Folder location
..
application/
---modules/
         test/
            --controllers/
                        --Test.php
            --views/
                       --testview.php
                          -themes/
                                   --test.php

themes/test.php
PHP Code:
This is test's

<?=$output?>
<?php
    /** -- Copy from here -- */
    if(!empty($meta))
    foreach($meta as $name=>$content){
        echo "\n\t\t";
        ?><meta name="<?php echo $name; ?>" content="<?php echo $content; ?>" /><?php
             }
    echo "\n";

    if(!empty($canonical))
    {
        echo "\n\t\t";
        ?><link rel="canonical" href="<?php echo $canonical?>" /><?php

    }
    echo "\n\t";

    foreach($css as $file){
         echo "\n\t\t";
        ?><link rel="stylesheet" href="<?php echo $file; ?>" type="text/css" /><?php
    } echo "\n\t";

    foreach($js as $file){
            echo "\n\t\t";
            ?><script src="<?php echo $file; ?>"></script><?php
    } echo "\n\t";

    /** -- to here -- */
?>


testview.php
PHP Code:
<hr/>
This is from test view file<br


OutputSource is
PHP Code:
This is test's


<hr/>
This is from test view file<br/>
        <meta name="keywords" content="" />
        <meta name="description" content="" /> 
Reply


Messages In This Thread
Help me for this library - by Vimal - 03-11-2015, 11:58 PM
RE: Help me for this library - by mwhitney - 03-12-2015, 07:48 AM
RE: Help me for this library - by Vimal - 03-13-2015, 02:48 AM
RE: Help me for this library - by Vimal - 03-13-2015, 05:17 AM
RE: Help me for this library - by Sushilkumar - 03-13-2015, 05:58 AM
RE: Help me for this library - by Vimal - 03-13-2015, 09:56 PM
RE: Help me for this library - by Sushilkumar - 03-14-2015, 10:09 PM
RE: Help me for this library - by vignesh.mi - 08-30-2018, 11:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB