Welcome Guest, Not a member yet? Register   Sign In
Problems with CSS frameworks
#1

[eluser]alex[/eluser]
Hi to everyone. My name is Alejandro and I'm newbie with CI. I've been doing some stuffs with it and I'm really excited about this framework but I can't integrate a CSS framework in order to handle the views. I could use a single css file but when I try to add a css framework it just doesn't work properly. I tried with YAML and also with Blueprint but got the same result (doesn't work) with both of them.
I'm making a controller and this one calls the view. That is correct, isn't?.

Does anybody has used any of this css frameworks? If your answer is "yes", could you please tell me where (folder location) should I copy the css framework files?

I'll be really apretiate if you can help me with this deal

Thanks in advance
Alejandro


P.S.: just for the record: if I test my web desing (working under the css framework) works ok but when I try to access to my web desing under CI, then I got problems.
P.S2: I'm using CI 2.0.2
P.S3: I'm trying to access to my web site is this:
localhost\coud\index.php\prueba_yaml

This is the simple example and doesn't work:
CONTROLLER:
File name: prueba_yaml.php
Location: C:\xampp\htdocs\coud\application\controller
Code:
Code:
<?php

class Prueba_blue extends CI_Controller{
    function index (){
        $this->load->view('vista_prueba_blue');
    }
}
?>

VIEW:
File name: vista_prueba_yaml.php
Location: C:\xampp\htdocs\coud\application\views
Code:
Code:
<html>
.
.
.
<link href="application/views/css/layout_2col_left_13.css" rel="stylesheet" type="text/css"/>
.
.
.
</html>
#2

[eluser]Stoney[/eluser]
You are trying to call controller prueba_yaml, but you are refferring to Prueba_blue.
Try localhost\coud\index.php\prueba_blue

Your view file is wrong at the controller too, you should change it to $this->load->view('vista_prueba_yaml'); in your case...

You should place the css file to /root/css folder and link it to href = base_url().'css/layout.css'
#3

[eluser]alex[/eluser]
Hi Stoney! Thank you for your quick answer. You're absolutely right about the controller: it's wrong and that's because I mixed the blueprint example controller and the yaml's controller. But if were the right controller and even with your advise the deal doesn't work properly. I'll copy the controller which works ir order to show you what I'm doing:

Code:
<?php
class Prueba_yaml extends CI_Controller {
    
    function index()
    {
        $this->load->view('vista_prueba_yaml');
    }
}
?>

and I'm calling the controller like this:
root/index.php/prueba_yaml

Thank you again
Alejandro
#4

[eluser]alex[/eluser]
SOLVED!

For the one who are trying to use YAML (the css framework) with CI, what I worked for me it was this:

1) Copy the "yaml" folder into the CI root folder
2) Create a folder into the CI root folder and copy your .css files
3) Use the complete path (with the 'http' included) into the link tag of your view file to call the layout
eg:
Code:
<link href="http://localhost/mysite/css/mylayout.css" rel="stylesheet" type="text/css"/>

4) Remember to change the path into the framework files (like "basememod.css" or "content.css")

And that's it. It works for me and I hope that works too for everyone who are trying to use CI with YAML

Regards!




Theme © iAndrew 2016 - Forum software by © MyBB