booxvid Posted September 5, 2012 Share Posted September 5, 2012 I'm just a newbie with this CodeIgniter framework and I'm currently working on a simple registration form. Right now, I have a difficulty in displaying css designs. Where would be my css folder will be placed that can have a short location in placing the href tag? Link to comment https://forums.phpfreaks.com/topic/268015-css-files-and-images-where-will-i-place-this-folder/ Share on other sites More sharing options...
Mahngiel Posted September 5, 2012 Share Posted September 5, 2012 Somewhere in your views directory. I pretty much copy/paste this into my MY_model class. //special routes define('ADMINCP', 'admincp/'); define('WIDGETS', 'application/widgets/'); // theme url defined define('THEME_URL', base_url() . 'application/views/' ); // places to find assets define('CSS', THEME_URL . 'assets/css/'); define('LESS', THEME_URL . 'assets/less/'); define('FONTS', THEME_URL . 'assets/fonts/'); define('JS', THEME_URL . 'assets/js/'); define('IMAGE', THEME_URL . 'assets/images/'); // reference to views from controllers define('SITE', 'templates/public/'); define('ADMIN', 'templates/admincp/'); define('WIDGET', 'templates/widgets/'); // full http link for images define('IMAGES', base_url() . 'application/views/images/'); Then you can use them in your header template like thusly: <link rel="stylesheet/css" type="text/css" href="<?php echo JS; ?>jquery-ui-1.8.21.custom.css"> <?php echo link_tag(CSS . 'style.css'); ?> In case that doesn't give you enough clues about directory structure: Link to comment https://forums.phpfreaks.com/topic/268015-css-files-and-images-where-will-i-place-this-folder/#findComment-1375536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.