Welcome Guest, Not a member yet? Register   Sign In
HMVC Modules and same CSS file.
#1

[eluser]skiter[/eluser]
Hi.

I have problem with HMVC 5.3? 5.4? Installed, anyway here is a 'folder':

.htaccess
application
-modules
--admin
---controllers
---views
--main
---controllers
---views
css
img
index.php
js
system

And they have 'almost' same code:
Code:
class Main extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->driver('minify');
    }
    
    public function index() {
        $this->load->view('main');
    }

}
Admin have only 'class' name change Wink

And view:
Code:
<style type="text/css">
<?php echo $this->minify->combine_directory('./css'); ?>
</style>
[removed]
<?php echo $this->minify->combine_directory('./js'); ?>
[removed]
Both have same view code, but only for 'main' show images! Admin, have only text, but no images inside :/

Here is CSS:
Code:
#validator li{
    background: url('./img/dot.gif') no-repeat left center;
    display: inline;
    height: 15px;
    padding-left: 15px;
}

I have route.php as default 'main', when address is: / all fine, but on: /admin

is only show 'text' but not CSS/images - to fix that i need change from: './img' to: '../img'

Is there any way to share same images in this modules? When i look into source code view in browser, all CSS rules look fine! Only problem is with path to images, have no idea where and why is not 'get right path' on 'non default' modules.




Theme © iAndrew 2016 - Forum software by © MyBB